// Use this for initialization void Start() { transform.localPosition = new Vector2(1, 7); allDirections[0] = Vector2.left; allDirections[1] = Vector2.right; allDirections[2] = Vector2.up; allDirections[3] = Vector2.down; find = GameObject.Find("PillsSpawn"); lookFor = find.GetComponent <PillsSpawn>(); playerChar = GameObject.Find("watman_1"); playerCharScript = playerChar.GetComponent <PacmanMovement>(); l_portal = GameObject.Find("left_portal"); r_portal = GameObject.Find("right_portal"); eatenSound = GameObject.Find("eatenSound"); soundEaten = eatenSound.GetComponent <AudioSource>(); target = new Vector2(1, 7); spawnCoordinates = new Vector2(0, 4); initialCoordinates = new Vector2(1, 7); red = GameObject.Find("ghost"); blue_ = GameObject.Find("ghost_blue"); orange = GameObject.Find("ghost_orange"); pink = GameObject.Find("ghost_pink"); pScript = pink.GetComponent <Pink_movement>(); oScript = orange.GetComponent <Orange_movement>(); bScript = blue_.GetComponent <Blue_movement>(); rScript = red.GetComponent <red_movement>(); }
// Use this for initialization void Start() { find = GameObject.Find("PillsSpawn"); lookFor = find.GetComponent <PillsSpawn>(); transform.position = new Vector2(1.5f, -5); _audio = gameObject.GetComponent <AudioSource>(); //position = gameObject.transform.position; red = GameObject.Find("ghost"); blue = GameObject.Find("ghost_blue"); orange = GameObject.Find("ghost_orange"); pink = GameObject.Find("ghost_pink"); pScript = pink.GetComponent <Pink_movement>(); oScript = orange.GetComponent <Orange_movement>(); bScript = blue.GetComponent <Blue_movement>(); rScript = red.GetComponent <red_movement>(); background = GameObject.Find("background_sound"); backgroundFear = GameObject.Find("fearModeSound"); soundOfDeath = GameObject.Find("DeathSound"); backgroundSound = background.GetComponent <AudioSource>(); backgroundFearSound = backgroundFear.GetComponent <AudioSource>(); deathSound = soundOfDeath.GetComponent <AudioSource>(); introSound = GameObject.Find("IntroSound"); introMusic = background.GetComponent <AudioSource>(); canvas = GameObject.Find("Canvas"); readyCanvas = canvas.GetComponent <Canvas>(); highScore.text = StaticStas.Points.ToString(); StartGame(); }
private void Start() { playerChar = GameObject.Find("watman_1"); sounds = playerChar.GetComponent <PacmanMovement>(); red = GameObject.Find("ghost"); redScript = red.GetComponent <red_movement>(); blue = GameObject.Find("ghost_blue"); blueScript = blue.GetComponent <Blue_movement>(); orange = GameObject.Find("ghost_orange"); orangeScript = orange.GetComponent <Orange_movement>(); pink = GameObject.Find("ghost_pink"); pinkScript = pink.GetComponent <Pink_movement>(); find = GameObject.Find("PillsSpawn"); lookFor = find.GetComponent <PillsSpawn>(); }
// Use this for initialization void Start() { fearModeSound = GameObject.Find("fearModeSound"); fearSound = fearModeSound.GetComponent <AudioSource>(); mainBackground = GameObject.Find("background_sound"); backgroundSound = mainBackground.GetComponent <AudioSource>(); red = GameObject.Find("ghost"); blue = GameObject.Find("ghost_blue"); orange = GameObject.Find("ghost_orange"); pink = GameObject.Find("ghost_pink"); pScript = pink.GetComponent <Pink_movement>(); oScript = orange.GetComponent <Orange_movement>(); bScript = blue.GetComponent <Blue_movement>(); rScript = red.GetComponent <red_movement>(); }