Exemplo n.º 1
0
    //CinemachineVirtualCamera StockPreviousCam = null;

    void Start()
    {
        _instance = this;

        cameraObj = Camera.main;

        cameraBrain = GameObject.FindObjectOfType <CinemachineBrain>();

        currentSequence = sequences[0];

        blenderSettings = ScriptableObject.CreateInstance("CinemachineBlenderSettings") as CinemachineBlenderSettings;
    }
Exemplo n.º 2
0
    public virtual void Die(bool isSuicide, bool countsAsPlayerKill = true)
    {
        if (!isDead)
        {
            isDead = true;

            if (!isSuicide)
            {
                GameObject.FindObjectOfType <C_Fx>().EnnemiDeath(transform.position);
            }

            C_SequenceHandler handler = FindObjectOfType <C_SequenceHandler>();
            if (handler != null && countsAsPlayerKill)
            {
                handler.OnEnemyKill();
            }
            Destroy(this.gameObject);
        }
    }