// Use this for initialization public void Start() { // Get components for pathfinding seeker = GetComponent <Seeker>(); controller = GetComponent <CharacterController>(); FastTex = (Texture2D)Resources.Load("ZombieFastTex"); SneakyTex = (Texture2D)Resources.Load("ZombieSneakyTex"); //ToughTex = (Texture2D)Resources.Load ("ZombieToughTex"); HumanTex = (Texture2D)Resources.Load("HumanTex"); //MilitaryTex = (Texture2D)Resources.Load ("MilitaryTex"); CurrUsingAttack = StateCharacterAtkUsing.WeakAttack; CurrBehavior = StateCharacterBehave.AtkNearest; //CurrCharacterType = StateCharacterType.Human; CurrZombType = StateZombieType.Fast; CurrAnimation = StateAnim.Standing; //isTargeting = false; isArmed = false; maxHealth = 8; // was 75; currHealth = maxHealth; maxResistance = 75; currResistance = maxResistance; baseAttackDamage = 2; timeSinceLastAttack = 0; speedPerSec = 2000.0f; if (CurrCharacterType == StateCharacterType.Human) { HumanoidHandler.ListOfHumans.Add(this); } else { HumanoidHandler.ListOfZombies.Add(this); } }
// Use this for initialization public void Start() { // Get components for pathfinding seeker = GetComponent<Seeker>(); controller = GetComponent<CharacterController>(); FastTex = (Texture2D)Resources.Load ("ZombieFastTex"); SneakyTex = (Texture2D)Resources.Load ("ZombieSneakyTex"); //ToughTex = (Texture2D)Resources.Load ("ZombieToughTex"); HumanTex = (Texture2D)Resources.Load ("HumanTex"); //MilitaryTex = (Texture2D)Resources.Load ("MilitaryTex"); CurrUsingAttack = StateCharacterAtkUsing.WeakAttack; CurrBehavior = StateCharacterBehave.AtkNearest; //CurrCharacterType = StateCharacterType.Human; CurrZombType = StateZombieType.Fast; CurrAnimation = StateAnim.Standing; //isTargeting = false; isArmed = false; maxHealth = 8; // was 75; currHealth = maxHealth; maxResistance = 75; currResistance = maxResistance; baseAttackDamage = 2; timeSinceLastAttack = 0; speedPerSec = 2000.0f; if( CurrCharacterType == StateCharacterType.Human ) { HumanoidHandler.ListOfHumans.Add (this); } else { HumanoidHandler.ListOfZombies.Add(this); } }