示例#1
0
        void Reset()
        {
            moveable             = GetComponent <MoveableUnit>();
            stopBeforeAttackable = GetComponent <StopBeforeAttackableUnit>();
            stopAfterAttackable  = GetComponent <StopAfterAttackableUnit>();
            dontStopAttackable   = GetComponent <DontStopAttackableUnit>();

            enemyTargetable    = GetComponent <EnemyTargetableUnit>();
            friendlyTargetable = GetComponent <FriendlyTargetableUnit>();
            randomMoveable     = GetComponent <RandomMoveableUnit>();
            rushMoveable       = GetComponent <RushMoveableUnit>();
            restRushMoveable   = GetComponent <RestRushMoveableUnit>();
            followMoveable     = GetComponent <FollowMoveableUnit>();
            boss0Moveable      = GetComponent <Boss0MoveableUnit>();

            damageable    = GetComponent <DamageableUnit>();
            hpable        = GetComponent <HpableUnit>();
            mpable        = GetComponent <MpableUnit>();
            deathable     = GetComponent <DeathableUnit>();
            effectable    = GetComponent <EffectableUnit>();
            timeLimitable = GetComponent <TimeLimitableUnit>();
            orderable     = GetComponent <Orderable>();
            followable    = GetComponent <FollowableUnit>();

            animator   = GetComponent <Animator>();
            rigid      = GetComponent <Rigidbody2D>();
            renderer   = GetComponent <SpriteRenderer>();
            collider   = GetComponent <Collider2D>();
            tackleable = GetComponent <TackleableUnit>();

            cachedTransform = transform;
            shadow          = GetComponentInChildren <ShadowController>();
        }
 private void Reset()
 {
     unit   = GetComponent <Unit>();
     hpable = GetComponent <HpableUnit>();
 }