本文整理汇总了C#中PlayerStats类的典型用法代码示例。如果您正苦于以下问题:C# PlayerStats类的具体用法?C# PlayerStats怎么用?C# PlayerStats使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
PlayerStats类属于命名空间,在下文中一共展示了PlayerStats类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetData
public void SetData(PlayerStats stats)
{
this.stats = stats;
this.cooldown = Skills.HEAL_COOLDOWN;
inUse = false;
timer = 0;
}
示例2: Start
/// <summary>
/// Initialization method. Creates all the upgrade options.
/// </summary>
void Start()
{
levelUpgradeOptions = new PlayerStats[,] { { PlayerStats.Def, PlayerStats.HP },
{ PlayerStats.MovSpd, PlayerStats.HP },
{ PlayerStats.Def, PlayerStats.HP },
{ PlayerStats.Atk, PlayerStats.HP },
{ PlayerStats.Def, PlayerStats.HP },
{ PlayerStats.MovSpd, PlayerStats.HP },
{ PlayerStats.Atk, PlayerStats.HP },
{ PlayerStats.Def, PlayerStats.HP },
{ PlayerStats.Def, PlayerStats.HP },
{ PlayerStats.Def, PlayerStats.HP }
};
levelUpgradeBonuses = new float[,] { { 1, 5},
{ 1, 5},
{ 1, 5},
{ 0.5f, 5},
{ 3, 20},
{ 2, 5},
{ 1, 5},
{ 2, 5},
{ 2, 5},
{ 4, 20}
};
}
示例3: Awake
void Awake()
{
coords = new int[2];
lastCoords = new int[2];
canSee = new List<Player> ();
m_AttackAxisInUse = false;
tr = transform;
CombatMode = false;
pos = transform.position;
currentPath = new List<Vector2> ();
controller = GetComponent<PlayerController>();
workingAI = new AIBase (this);
lastInput = Vector3.one;
playerStats = new PlayerStats ();
currentState = CharacterState.Still;
controller.SetSpeed (playerStats.GetSpeed());
isStuck = 0;
canAttack = "Enemy";
coolDownLimit = playerStats.GetAttackCooldown();
currentAttackCoolDown = 0;
inventory = GetComponent<InventoryBase>();
weaponController = GetComponentInChildren<WeaponController> ();
anim = GetComponent<Animator>();
spriteRen = GetComponent<SpriteRenderer> ();
//seeker = GetComponent<Seeker> ();
}
示例4: Start
void Start()
{
playerStats = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<PlayerStats>();
sceneFadeInOut = GameObject.FindGameObjectWithTag(Tags.gameController).GetComponent<SceneFadeInOut>();
persistentData = GameObject.FindGameObjectWithTag (Tags.mainCamera).GetComponent<PersistentData> ();
centerMessageController = GameObject.FindGameObjectWithTag (Tags.canvas).GetComponentInChildren<CenterMessageController> ();
}
示例5: Item
protected Item(string name, int cost, string description, PlayerStats playerStats)
{
Name = name;
Cost = cost;
Description = description;
Stats = playerStats;
}
示例6: Start
void Start()
{
stats = PlayerStats.instance;
stats.curHealth = stats.maxHealth;
if (statusIndicator == null)
{
Debug.LogError("No status indicator referenced on Player");
}
else
{
statusIndicator.SetHealth(stats.curHealth, stats.maxHealth);
}
GameMaster.gm.onToggleUpgradeMenu += OnUpgradeMenuToggle;
GameMaster.gm.onToggleEscapeMenu += OnEscapeMenuToggle;
audioManager = AudioManager.instance;
if (audioManager == null)
{
Debug.LogError("PANIC! No audiomanager in scene.");
}
InvokeRepeating("RegenHealth", 1f / stats.healthRegenRate, 1f / stats.healthRegenRate);
}
示例7: onTriggerEnter
//Overrides
public override void onTriggerEnter(PlayerStats stats, ControllerGame controllerGame)
{
if (!_ticking || (_ticking && resetOnRetrigger == true))
{
animator.SetTrigger("StartTicking");
}
}
示例8: Awake
void Awake()
{
playerStats = GetComponent<PlayerStats>();
References.stateManager.changeState += onChangeState;
animations = GetComponentInChildren<Animations>();
enemies = new System.Collections.Generic.List<GameObject>();
}
示例9: Start
// Use this for initialization
void Start()
{
ps = gameObject.GetComponent<PlayerStats> ();
sc = gameObject.GetComponent<StateController> ();
tpb = gameObject.GetComponent<TestPlayerBehaviour> ();
buffSetup ();
}
示例10: Start
// Use this for initialization
void Start()
{
stats = player.GetComponent<PlayerStats> ();
lastPos = GetComponent<Transform>().position;
playerInputManager = GameObject.FindGameObjectWithTag("Player").GetComponent<InputHandler>();
}
示例11: Init
public void Init(Unit playerUnit, PlayerStats initStats)
{
PlayerUnit = playerUnit;
UpdateVariables(initStats);
CurrentDiamondsCount = new PlayerDiamonds(0, 0, 0);
}
示例12: Paint
public bool Paint(PlayerStats shooter, RaycastHit info)
{
if (!m_Initialized) {
Initialize ();
}
Color color = shooter.PlayerColor;
color.a = 1f;
Vector2 uv = info.textureCoord;
int x = (int)(uv.x * m_Texture.width);
int y = (int)(uv.y * m_Texture.height);
for(int row = 0; row < m_Splat.height; row++) {
for(int col = 0; col < m_Splat.width; col++) {
Color c0 = m_SplatPixels[row * m_Splat.width + col];
Color c1 = color;
if(c0.a != 1f) {
m_Texture.SetPixel ((int)(x-m_Splat.width/2 + col), (int)(y-m_Splat.height/2 + row), c1);
}
}
}
m_Texture.Apply ();
return true;
}
示例13: BlowUpInFace
IEnumerator BlowUpInFace(PlayerStats ps)
{
// TODO: Add Confetti and funzies (jack in the box!)
int stuffz = 42;
for (int i = 0; i < stuffz; i++) {
GameObject go = null;
int rnd = Random.Range(0, 5);
switch (rnd) {
case(0):
go = banana;
break;
case (1):
go = stick;
break;
case (2):
go = sap;
break;
case (3):
go = leaf;
break;
default:
go = berries(berry, ps);
break;
}
AreaPlacement(5, transform.position + transform.up * 3, go);
yield return new WaitForSeconds(.5f);
}
}
示例14: Start
// Use this for initialization
void Start()
{
maxHP = HP = 40;
damage = 5;
Player = GameObject.Find ("Player");
ps = Player.GetComponent<PlayerStats> ();
}
示例15: Start
void Start()
{
m_LineRenderer = GetComponent<LineRenderer> ();
m_Camera = GetComponentInParent<Camera> ();
m_Control = GetComponentInParent<IControl> ();
m_PlayerStats = GetComponentInParent<PlayerStats> ();
}