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

        I = this;

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