Exemplo n.º 1
0
    public void KillerAction()
    {
        if (kill)
        {
            //Animator killanim = GetComponent<Animator>();
            //killanim.SetBool("kill", true);
            playerManager = player.GetComponent <PlayerManager>();
            StartCoroutine("AnimCoroutine");
            //playerManager.HP -= 1000;
            playerManager.Damageplayer();
        }
        else if (entermirror)
        {
            mirrorManager  = mirror.GetComponent <MirrorManager>();
            in_mirrorworld = true;
            GetComponent <PlayerMove>().speed  = 21;
            this.gameObject.transform.position = mirrorManager.warppointer.transform.position;
            GetComponent <KillerEffectObject>().InnerMirror = true;
        }
        else if (upstairs)
        {
            up_stair = stairs.GetComponent <UpStairs>();
            this.gameObject.transform.position = up_stair.stairs_up.transform.position;
        }
        else if (downstairs)
        {
            down_stair = stairs.GetComponent <DownStairs>();
            this.gameObject.transform.position = down_stair.stairs_down.transform.position;
        }
        else if (exitmirrorworld)
        {
            mirrorManager  = mirror.GetComponent <MirrorManager>();
            in_mirrorworld = false;;
            GetComponent <PlayerMove>().speed  = 7;
            this.gameObject.transform.position = mirrorManager.warppointer.transform.position;
            GetComponent <KillerEffectObject>().InnerMirror = false;
        }

        kill        = false;
        entermirror = false;
        upstairs    = false;
        downstairs  = false;
    }
Exemplo n.º 2
0
    //void CalledOnLevelWasLoaded(int level)
    //{
    // check if we are outside the Arena and if it's the case, spawn around the center of the arena in a safe zone
    //if (!Physics.Raycast(transform.position, -Vector3.up, 5f))
    //{
    //transform.position = new Vector3(0f, 0f, 0f);
    //}
    //}
    #endregion


    public void SurviorAction()
    {
        if (breakmirror)
        {
            mirrormanager = mirror.GetComponent <MirrorManager>();
            StartCoroutine("Breakcoroutine");
            mirrormanager.Breaking();
        }
        else if (upstairs)
        {
            up_stair = stairs.GetComponent <UpStairs>();
            this.gameObject.transform.position = up_stair.stairs_up.transform.position;
        }
        else if (downstairs)
        {
            down_stair = stairs.GetComponent <DownStairs>();
            this.gameObject.transform.position = down_stair.stairs_down.transform.position;
        }

        //breakmirror = false;
        upstairs   = false;
        downstairs = false;
    }