Exemplo n.º 1
0
 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>();
 }
Exemplo n.º 3
0
    void Awake()
    {
        if (SystemMNG.I == null)
        {
            Instantiate(Resources.Load("Prefabs/System/SystemMNG"));
        }

        I = this;

        uiMNG = GetComponent <UIMNG>();
    }
Exemplo n.º 4
0
 private void Awake()
 {
     if (_gameMNG == null)
     {
         _gameMNG = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Exemplo n.º 5
0
 void Awake()
 {
     _instance = this;
 }
Exemplo n.º 6
0
 void Awake()
 {
     I           = this;
     unitPrefab  = (GameObject)Resources.Load("Prefabs/Unit/Unit");
     lightPrefab = (GameObject)Resources.Load("Prefabs/Unit/Light");
 }
Exemplo n.º 7
0
 void Awake()
 {
     I = this;
 }