void MakeInstance() { if (instance == null) { instance = this; } }
void Start() { myself = GameObject.Find("fox"); EM = GameObject.Find("EnemyManger").GetComponent <EnemyManger>(); PM = GameObject.Find("PropManger").GetComponent <PropManger>(); score = 0; //BuildFloor(); //BuildScenery(); }
private void Awake() { if (instance != null) { Debug.Log("Warning multiple mangers found"); return; } instance = this; }
// Use this for initialization void Start() { Player = GetComponent <Rigidbody2D>(); GroundCheck = transform.Find("GroundCheck"); GM = GameObject.Find("GameManger").GetComponent <GameManger>(); EM = GameObject.Find("EnemyManger").GetComponent <EnemyManger>(); PM = GameObject.Find("PropManger").GetComponent <PropManger>(); animation = GetComponent <Animator>(); bobo = transform.Find("bobo"); }
// Use this for initialization void Start() { if (!GameObject.Find("fox")) { Destroy(this.gameObject); } Player = GameObject.Find("fox").GetComponent <PlayerControl>(); GM = GameObject.Find("GameManger").GetComponent <GameManger>(); EM = GameObject.Find("EnemyManger").GetComponent <EnemyManger>(); }
// Use this for initialization void Start() { if (!GameObject.Find("fox")) { Destroy(this.gameObject); } Player = GameObject.Find("fox").GetComponent <PlayerControl>(); GM = GameObject.Find("GameManger").GetComponent <GameManger>(); EM = GameObject.Find("EnemyManger").GetComponent <EnemyManger>(); ani = GetComponent <Animator>(); Myposition = transform.position; Myposition.y += 0.7f; transform.position = Myposition; }
// Use this for initialization void Start() { life = 1; if (!GameObject.Find("fox")) { Destroy(this.gameObject); } Player = GameObject.Find("fox").GetComponent <PlayerControl>(); GM = GameObject.Find("GameManger").GetComponent <GameManger>(); EM = GameObject.Find("EnemyManger").GetComponent <EnemyManger>(); Myposition = transform.position; Myposition.y -= 1.16f; transform.position = Myposition; }
// Use this for initialization void Start() { enemyManager = GameObject.FindGameObjectWithTag("EnemyManger").GetComponent <EnemyManger>(); player = GetComponent <Player>(); }
// Use this for initialization void Start() { enemyManager = GameObject.FindGameObjectWithTag("EnemyManger").GetComponent<EnemyManger>(); player = GetComponent<Player>(); }