private void Awake() { if (!instance2) { instance2 = this; } }
// Use this for initialization void Start() { GameManager = GameObject.Find("GameManager").GetComponent <GameMNG> (); spriteRenderer = GetComponent <SpriteRenderer>(); WeaponsOnHand = new GameObject[3]; //instantly makes 3 slots RB2D = GetComponent <Rigidbody2D> (); PlayerAnimator = GetComponent <Animator>(); LegAnimator = transform.Find("Legs").gameObject.GetComponent <Animator>(); }
void Awake() { if (SystemMNG.I == null) { Instantiate(Resources.Load("Prefabs/System/SystemMNG")); } I = this; uiMNG = GetComponent <UIMNG>(); }
private void Awake() { if (_gameMNG == null) { _gameMNG = this; } else { Destroy(gameObject); } }
void Awake() { _instance = this; }
void Awake() { I = this; unitPrefab = (GameObject)Resources.Load("Prefabs/Unit/Unit"); lightPrefab = (GameObject)Resources.Load("Prefabs/Unit/Light"); }
void Awake() { I = this; }