Пример #1
0
    void Start()
    {
        RotationModule          = GetComponent <RotationModule_Enemy>();
        AttackModule            = GetComponent <AttackModule_Enemy>();
        HealthController        = GetComponent <HealthController>();
        HealthController.OnDie += Die;

        SetState(new IdleState(this));
    }
Пример #2
0
    protected void Start()
    {
        RotationModule   = GetComponent <RotationModule_Enemy>();
        MovementModule   = GetComponent <MovementModule_Navigation>();
        AttackModule     = GetComponent <AttackModule_Enemy>();
        HealthController = GetComponent <HealthController>();
        if (HealthController)
        {
            HealthController.OnDie += Die;
        }


        if (currentState == null)
        {
            SetState(new InativeState(this));
        }
    }