示例#1
0
    // Use this for initialization
    void Start()
    {
        //Get Script "CubeActions" from player
        player       = GameObject.FindWithTag("Player");
        _CubeActions = player.GetComponent <CubeActions>();

        Vector3 spawnpoint = _CubeActions.GetSpawnpoint();

        player.transform.position = spawnpoint;
        //Spawn GlowPlayer at the death location of the player
        if (_CubeActions.GetGlow() > 0)
        {
            Vector3 deathpoint = _CubeActions.GetDeathpoint();
            Instantiate(glowPlayer, deathpoint, Quaternion.identity);
        }
        Instantiate(stagePopUp, Vector3.zero, Quaternion.identity);
    }
 void Start()
 {
     _CubeActions = gameObject.GetComponent <CubeActions>();
 }