Inheritance: BaseAbility
Example #1
0
 public ThinkRoamAround(Vector2 anchor, float roamingRadius, float attackRange = 60, float sightRange = 110, float damage = 10f, bool canBeAttacked = true)
     : base()
 {
     _canBeAttacked = canBeAttacked;
     _goTo = new GoToPosition(.5f);
     _swing = new SwingHitAbility(1500, 0f, attackRange, damage);
     _rand = new Random();
     _anchor = anchor;
     _radius = roamingRadius;
     _state = RoamState.Idle;
     SightRange = sightRange;
 }
Example #2
0
        public ThinkInputGuided(float speed = .125f)
        {
            Speed = speed;

            _jump = new JumpAbility();
            _swing = new SwingHitAbility(700, 1);
            _interact = new InteractAbility();

            // Subscribe to Input events
            _input = InputManager.Instance;
            _input.KUsePotion.Pressed += new EventHandler(OnUsePotion);
            _input.KHit.Pressed += new EventHandler(OnExecuteHit);
            _input.KInteract.Pressed += new EventHandler(OnInteract);
            _input.KJump.Pressed += new EventHandler(OnJump);
        }
Example #3
0
        public ThinkInputGuided(float speed = .125f)
        {
            Speed = speed;

            Jump = new JumpAbility();
            Swing = new SwingHitAbility(400, 1);
            Shooter = new ShooterAbility();
            Interact = new InteractAbility();
            _frozen = false;

              /*  // Subscribe to Input events
            _input = InputManager.Instance;
            _input.KUsePotion.Pressed += new EventHandler(OnUsePotion);
            _input.KHit.Pressed += new EventHandler(OnExecuteHit);
            _input.KInteract.Pressed += new EventHandler(OnInteract);
            _input.KJump.Pressed += new EventHandler(OnJump);*/
        }