Example #1
0
 public void GameEnd(int[] Winplayer)
 {
     WinPlayer  = Winplayer;
     InGame     = false;
     changeTest = GameObject.FindGameObjectWithTag("SceneChangeTester").GetComponent <SceneChangeTest>();
     changeTest.LoadWinScene();
 }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        if (instance == null)
        {
            if (!Title)
            {
                SceneManager.LoadSceneAsync(ModeArray[ModeChoosing], LoadSceneMode.Additive);
            }
            DontDestroyOnLoad(this.gameObject);
            instance = this;
        }
        else if (this != instance)
        {
            Destroy(this.gameObject);
        }

        if (Screen.dpi < 1)
        {
            dpiScale = 1;
        }
        if (Screen.dpi < 200)
        {
            dpiScale = 1;
        }
        else
        {
            dpiScale = Screen.dpi / 200f;
        }
        guiStyleHeader.fontSize = (int)(15f * dpiScale);

        // SceneManager.LoadSceneAsync("EmptyScene", LoadSceneMode.Additive);
    }
Example #3
0
 // Start is called before the first frame update
 void Start()
 {
     players.Clear();
     StageManager.instance.OnPlayerJoin += PlayerJoin;
     for (int i = 0; i < StageManager.players.Count; i++)
     {
         Vector3    p = GameObject.FindGameObjectWithTag("StageInfoTransform").GetComponent <StageInfo>().SpawnPosition[i];
         Vector3    r = GameObject.FindGameObjectWithTag("StageInfoTransform").GetComponent <StageInfo>().SpawnRotation[i];
         GameObject g = Instantiate(KungFuPlayer, p, Quaternion.Euler(r));
         g.GetComponent <DefendPlayer>().Set(StageManager.players[i], i);
         g.GetComponent <DefendPlayer>().ClothNum  = StageManager.players[i].GetComponent <PlayerIdentity>().ClothNum;
         g.GetComponent <DefendPlayer>().Playernum = i;
         g.GetComponentInChildren <PlayerCreating>().CreatMini();
         players.Add(g);
         PlayerLifes = StageManager.players.Count;
     }
     changeTest = GameObject.FindGameObjectWithTag("SceneChangeTester").GetComponent <SceneChangeTest>();
 }
Example #4
0
    // Start is called before the first frame update
    void Start()
    {
        changeTest = GameObject.FindGameObjectWithTag("SceneChangeTester").GetComponent <SceneChangeTest>();

        meshRenderer = GetComponent <MeshRenderer>();
    }
Example #5
0
    public void ThrowPlayer()
    {
        SceneChangeTest sceneChangeTest = GameObject.FindGameObjectWithTag("SceneChangeTester").GetComponent <SceneChangeTest>();

        sceneChangeTest.ThrowPlayer();
    }