コード例 #1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     DontDestroyOnLoad(gameObject);
     onCharSelect = false;
     boolsSet     = false;
 }
コード例 #2
0
 // Setup for the character images, text, as well as panel color.
 void Start()
 {
     Urial.GetComponent <Image>().enabled      = false; Barachial.GetComponent <Image>().enabled = true; Lilith.GetComponent <Image>().enabled = false; Azazel.GetComponent <Image>().enabled = false;
     Player2Panel.GetComponent <Image>().color = new Vector4(124, 124, 124, 100);
     Player2Text.text      = "Player Two";
     Player2Character.text = "Barachial";
     curCharacter          = 2;
     canSwap  = true;
     selected = false; deselected = true;
     // Get the Rewired Player object for this player and keep it for the duration of the character's lifetime
     player          = ReInput.players.GetPlayer(playerId);
     canSelect       = true;
     MasterSelector  = GameObject.Find("CharacterMaster");
     masterReference = MasterSelector.GetComponent <MasterSelector>();
 }
コード例 #3
0
 void Awake()
 {
     instance = this;
 }