示例#1
0
    //--------------------------------------------------------------------------------
    // EVENT CALLBACKS
    //--------------------------------------------------------------------------------

    void Awake()
    {
        // EAGERLY ACQUIRE SINGLETON REFERENCE
        inst = this;

        // CACHE COMMON SIBLINGS
        input = GetComponent <HeroInput>();
        fx    = GetComponentInChildren <HeroFX>();
        body  = this.rigidbody;
        xform = this.transform;
    }
示例#2
0
文件: Hero.cs 项目: Cyberbanan/LD29
    //--------------------------------------------------------------------------------
    // EVENT CALLBACKS
    //--------------------------------------------------------------------------------
    void Awake()
    {
        // EAGERLY ACQUIRE SINGLETON REFERENCE
        inst = this;

        // CACHE COMMON SIBLINGS
        input = GetComponent<HeroInput>();
        fx = GetComponentInChildren<HeroFX>();
        body = this.rigidbody;
        xform = this.transform;
    }