Jump while on ground. The rest jumps, are managed here, but using jump properties/type elsewhere, just by calling Jump() / ForceJump()\n NOTE unity-platformer support multiple types of jumps. We just ship one type here, be free to extend!\n NOTE executionOrder should be -20\n TODO force one jump per press, force to release before another jump\n
Inheritance: CharacterAction
Ejemplo n.º 1
0
        public override void OnEnable()
        {
            base.OnEnable();

            dismount   = new Cooldown(dismountTime);
            actionJump = character.GetAction <CharacterActionJump>();
        }
Ejemplo n.º 2
0
        public override void OnEnable()
        {
            base.OnEnable();

            actionJump = character.GetAction <CharacterActionJump>();
            canGrab    = new Cooldown(grabAgainCooldown);
        }
    public override void OnEnable() {
      base.OnEnable();

      dismount = new Cooldown(dismountTime);
      actionJump = character.GetAction<CharacterActionJump>();
      if (actionJump == null) {
        Debug.LogError("CharacterActionLadder requires CharacterActionJump");
      }
    }
        public override void OnEnable()
        {
            base.OnEnable();

            actionJump = character.GetAction <CharacterActionJump>();
            if (actionJump == null)
            {
                Debug.LogError("CharacterActionFence requires CharacterActionJump");
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Force a player to jump!
        /// </summary>
        public virtual void StartJump(Character character)
        {
            CharacterActionJump actionJump = character.GetAction <CharacterActionJump>();

            Assert.IsNotNull(actionJump, "(Jumper) Missing Monobehaviour CharacterActionJump at " + character.gameObject.GetFullName());

            actionJump.ForceJump(
                new JumpConstantSpring(character, jumpProperties.Clone(1))
                );
        }
    public override void OnEnable() {
      base.OnEnable();

      actionJump = character.GetAction<CharacterActionJump>();
      if (actionJump == null) {
        Debug.LogError("CharacterActionFence requires CharacterActionJump");
      }

      input.onActionUp += OnActionUp;
      input.onActionDown += OnActionDown;
    }
Ejemplo n.º 7
0
        public override void OnEnable()
        {
            base.OnEnable();

            dismount   = new Cooldown(dismountTime);
            actionJump = character.GetAction <CharacterActionJump>();
            if (actionJump == null)
            {
                Debug.LogError("CharacterActionLadder requires CharacterActionJump");
            }
        }
        public override void OnEnable()
        {
            base.OnEnable();

            actionJump = character.GetAction <CharacterActionJump>();
            if (actionJump == null && dismountJumping)
            {
                Debug.LogWarning("CharacterActionJump is required in CharacterActionRope because dismountJumping is true");
            }
            canGrab = new Cooldown(grabAgainCooldown);
        }
Ejemplo n.º 9
0
        public virtual void StartJump(Character c)
        {
            // search CharacterActionJump
            CharacterActionJump actionJump = null;

            foreach (var x in c.actions)
            {
                if (x is CharacterActionJump)
                {
                    actionJump = x as CharacterActionJump;
                }
            }

            if (actionJump != null)
            {
                actionJump.ForceJump(
                    new JumpConstantSpring(c, jumpProperties.Clone(1))
                    );
            }
            else
            {
                Debug.LogWarning("character found without CharacterActionJump so ignore.");
            }
        }
 void Start()
 {
     actionJump = character.GetAction <CharacterActionJump>();
 }
    public override void OnEnable() {
      base.OnEnable();

      actionJump = character.GetAction<CharacterActionJump>();
      canGrab = new Cooldown(grabAgainCooldown);
    }
 public override void OnEnable() {
   base.OnEnable();
   character.onStateChange += OnEnterState;
   actionJump = character.GetAction<CharacterActionJump>();
 }
 public override void OnEnable()
 {
     base.OnEnable();
     character.onStateChange += OnEnterState;
     actionJump = character.GetAction <CharacterActionJump>();
 }
Ejemplo n.º 14
0
 void Start() {
   actionJump = character.GetAction<CharacterActionJump>();
 }