// Use this for initialization void Start() { m_instance = this; m_animator = GetComponent <Animator>(); m_transition = 0.0f; m_animWalk = new AnimWalkFWD(); m_animDuck = new AnimDuck(); m_animRun = new AnimRun(); m_animIdle = new AnimIdle(); //m_animIdle.SetFrames(m_framesToAdd); }
private void MoveControl(GameTime gametime) { if (right == true) { velocity.X = 1.33f; AnimWalk.Update(gametime); } if (left == true) { velocity.X = -1.3f; AnimWalk.Update(gametime); } if (runright == true) { velocity.X = 2f; AnimRun.Update(gametime); } if (runleft == true) { velocity.X = -2f; AnimRun.Update(gametime); } if (bark == true) { velocity.X = 0; velocity.Y = 0; AnimBark.Update(gametime); } if (pee == true) { velocity.X = 0; velocity.Y = 0; AnimPee.Update(gametime); } if (flip == true) { AnimFlip.Update(gametime); } if (jumped == true) { AnimJump.Update(gametime); } else { animation = AnimIdle; AnimIdle.Update(gametime); } }