public Imp(Vector2 position, Environment.Map map) { actionTimeCounter = 0; hp = 100; damage = 0; thingTyp = Vars_Func.ThingTyp.Imp; this.position = position; path = new Stack <Vector2>(); map.getHexagonAt(position).Imps.Add(this); map.ImpList.Add(this); currentJob = new Job(Vars_Func.ImpJob.Idle); this.model = new CharacterModel(Vars_Func.getImpModell().Model, Vars_Func.getImpModell().AnimationClip); updatePlayer = true; currentHex = map.getHexagonAt(position); oldHex = map.getHexagonAt(position); targetHex = null; animationSpeeds = new float[4]; animationSpeeds[0] = 2; animationSpeeds[1] = 1; animationSpeeds[2] = 1; animationSpeeds[3] = 1; }
public Creature(Vars_Func.CreatureTyp typ, Vector2 position, Nest home, Vars_Func.ThingTyp allignment, Environment.Map map, int[] upgrades, int startage = 0) { switch (typ) { case Vars_Func.CreatureTyp.Beetle: this.typ = typ; this.position = position; this.home = home; thingTyp = allignment; size = 1; speed = 1 + upgrades[2] * 0.2f; actionTimeCounter = 0; vision = 4; damageTaken = 0; hp = 200 + upgrades[1] * 100; damage = 10 + upgrades[0] * 4; age = startage; maxAge = 100; ageModifire = 1; map.getHexagonAt(position).Obj = this; map.Creatures.Add(this); animationSpeeds = new float[2]; animationSpeeds[0] = 2.5f; animationSpeeds[1] = 1; break; case Vars_Func.CreatureTyp.Skeleton: this.typ = typ; this.position = position; this.home = home; thingTyp = allignment; size = 1; speed = 1 + upgrades[2] * 0.2f; actionTimeCounter = 0; vision = 4; damageTaken = 0; hp = 100 + upgrades[1] * 50; damage = 15 + upgrades[0] * 6; age = startage; maxAge = 120; ageModifire = 1; map.getHexagonAt(position).Obj = this; map.Creatures.Add(this); animationSpeeds = new float[2]; animationSpeeds[0] = 2; animationSpeeds[1] = 0.8f; break; case Vars_Func.CreatureTyp.Knight: this.typ = typ; this.position = position; this.home = home; thingTyp = allignment; size = 1; speed = 1; actionTimeCounter = 0; vision = 4; damageTaken = 0; hp = 150; damage = 10; age = startage; ageModifire = 1; map.getHexagonAt(position).Obj = this; map.Heroes.Add(this); currentState = Vars_Func.CreatureState.Starting; startHex = map.getHexagonAt(home.Position); startLerpCounter = 0; reachGround = false; animationSpeeds = new float[3]; animationSpeeds[0] = 2; animationSpeeds[1] = 0.8f; animationSpeeds[2] = 1; break; case Vars_Func.CreatureTyp.HQCreatur: this.typ = typ; this.position = position; this.home = home; thingTyp = allignment; size = 1; speed = 1; actionTimeCounter = 0; vision = 4; damageTaken = 0; hp = 5000; damage = 500; age = startage; ageModifire = 1; map.getHexagonAt(position).Obj = this; map.Creatures.Add(this); map.getHexagonAt(position).IsHQ = true; map.getHexagonAt(position).EnlightendHexagon(map); currentState = Vars_Func.CreatureState.PingPong; animationSpeeds = new float[2]; animationSpeeds[0] = 1; animationSpeeds[1] = 1; // Some Fireball Test //map.getHexagonAt(position).Fireball = Vars_Func.getFireBall(); break; } this.model = new CharacterModel(Vars_Func.getCreatureModell(typ).Model); model.AnimationClip = Vars_Func.getCreatureModell(typ).AnimationClip; updatePlayer = true; currentHex = map.getHexagonAt(position); oldHex = map.getHexagonAt(position); targetHex = null; oldTargetHex = null; tempZ = 0; }