示例#1
0
 Wolf(ILevelManager level, IUnit unit, WolfType myType)
     : base(level, unit)
 {
     this.myType     = myType;
     this.distCalc   = new WolfDistCalc(this, 0.5f, 0.2f, 1);
     this.AttackMove = true;
 }
示例#2
0
        public static Wolf CreateNew(ILevelManager level, IUnit unit, WolfType myType)
        {
            Wolf wolf = new Wolf(level, unit, myType);

            wolf.animationController = CreateAnimationController(unit);
            wolf.walker   = WorldWalker.CreateNew(wolf, level);
            wolf.attacker = MovingMeeleAttacker.CreateNew(wolf,
                                                          level,
                                                          true,
                                                          new IntVector2(20, 20),
                                                          1,
                                                          5,
                                                          0.5f);
            wolf.healthBar = new HealthBarControl(level, unit, 100, new Vector3(0, 0.7f, 0), new Vector2(0.5f, 0.1f), true);
            UnitSelector.CreateNew(wolf, level);
            MovingRangeTarget.CreateNew(wolf, level, targetOffset);
            unit.AlwaysVertical = false;
            wolf.RegisterEvents();
            return(wolf);
        }
示例#3
0
 public WolfSpawner(GameController input, GameUI ui, CameraMover camera, UnitType type, WolfType myType)
     : base(input, ui, camera, type)
 {
     this.myType = myType;
 }
示例#4
0
 public static Wolf CreateForLoading(ILevelManager level, IUnit unit, WolfType myType)
 {
     return(new Wolf(level, unit, myType));
 }