void Start() { thisScript = this.gameObject.GetComponent<script_Bot>(); botAI = (MineBotAI)this.gameObject.GetComponent("MineBotAI"); View = (PhotonView)gameObject.GetComponent<PhotonView>(); View.observed = thisScript; player = GameObject.FindGameObjectWithTag("Player"); playerScript = player.gameObject.GetComponent<script_Player>(); targetMover = player.gameObject.GetComponent<TargetMover>(); distanceDrawn = false; }
void Start() { thisScript = this.gameObject.GetComponent<script_Bot>(); botAI = (MineBotAI)this.gameObject.GetComponent("MineBotAI"); gameManager = GameObject.Find("prefab_2PGameManager(Clone)").gameObject.GetComponent<script_2PGameManager>(); canAttack = true; canMove = true; if (player1Unit) { player = GameObject.Find("Player 1"); ourPlayer = player; } else if (player2Unit) { player = GameObject.Find("Player 2"); ourPlayer = player; } playerScript = player.gameObject.GetComponent<script_Player>(); targetMover = player.gameObject.GetComponent<TargetMover>(); distanceDrawn = false; }