public HeroState(FSM fsm)
     : base(fsm)
 {
     Hero = (HeroMotion)fsm;
     animator = gameObject.GetComponent<Animator>();
     InputManager = gameObject.GetComponent<InputManager>();
 }
Example #2
0
    // Use this for initialization
    void Start()
    {
        mControl = gameObject.AddComponent<HeroControl> () as HeroControl;
        mControl.mHero = this;
        mMotion = gameObject.AddComponent<HeroMotion> () as HeroMotion;
        mMotion.mHero = this;
        mProperty = gameObject.AddComponent<HeroProperty> () as HeroProperty;

        mAnimator = gameObject.GetComponent<Animator>() as Animator;
    }
Example #3
0
    // Use this for initialization
    void Start()
    {
        mControl       = gameObject.AddComponent <HeroControl> () as HeroControl;
        mControl.mHero = this;
        mMotion        = gameObject.AddComponent <HeroMotion> () as HeroMotion;
        mMotion.mHero  = this;
        mProperty      = gameObject.AddComponent <HeroProperty> () as HeroProperty;


        mAnimator = gameObject.GetComponent <Animator>() as Animator;
    }