// 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); } }
// Use this for initialization public void Start() { 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; CurrAnimation = StateAnim.Standing; isArmed = false; maxResistance = 75; currResistance = maxResistance; maxHealth = 75; baseAttackDamage = 2; speedPerSec = 2.5f; timeSinceLastAttack = 0; if (CurrCharacterType == StateCharacterType.Human) // && HumanoidHandler.ListOfHumans.Count == 0 ) { //Debug.Log ("Entered AddHuman"); transform.tag = "Human"; //CurrCharacterType = StateCharacterType.Human; transform.GetComponentInChildren <SkinnedMeshRenderer>().material.mainTexture = HumanoidHandler.HumanTex; myListPos = ListOfHumans.Count; HumanoidHandler.ListOfHumans.Add(transform); } else { //Debug.Log ("Entered AddZombie"); transform.tag = "Zombie"; //CurrCharacterType = StateCharacterType.Zombie; switch (CurrZombType) { case StateZombieType.Fast: //Just faster speed. speedPerSec *= 2; maxHealth = 100; //transform.GetComponentInChildren<SkinnedMeshRenderer>().material.mainTexture = HumanoidHandler.FastTex; break; case StateZombieType.Sneeky: //Will need to wait until detection is setup! //transform.GetComponentInChildren<SkinnedMeshRenderer>().material.mainTexture = HumanoidHandler.SneakyTex; break; case StateZombieType.Strong: //Just more damage. baseAttackDamage *= 2; //transform.GetComponentInChildren<SkinnedMeshRenderer>().material.mainTexture = HumanoidHandler.ToughTex; break; } myListPos = ListOfZombies.Count; HumanoidHandler.ListOfZombies.Add(transform); } emptyTarget = Target; currHealth = maxHealth; TestingFun(); }