Esempio n. 1
0
        // Move
        public void Move(int Direction)
        {
            if (!IsDead() && !IsStunned())
            {
                PlayingAttack = false;
                Vector2 vector = new Vector2(GetSpeed() * Direction, 0);                 // Remove direction

                if (canMove(Direction))
                {
                    Move(PgtCommons.Convert(vector));
                }

//				if (!Animations.IsPlaying(walkLeftAnimation) && !Animations.IsPlaying(walkRightAnimation))
//				{
                if (Direction == Constants.MOVE_RIGHT)
                {
                    PlayAnimation(walkRightAnimation);
                }
                if (Direction == Constants.MOVE_LEFT)
                {
                    PlayAnimation(walkLeftAnimation);
                }
//				}
            }
        }
Esempio n. 2
0
 public void SetHealthDisplayLocalScale(Vector2 scale)
 {
     HealthDisplay.transform.localScale = PgtCommons.Convert(scale);
 }
Esempio n. 3
0
 public void SetHealthDisplayLocalPosition(Vector2 position)
 {
     HealthDisplay.transform.localPosition = PgtCommons.Convert(position);
 }