Esempio n. 1
0
 private void Awake()
 {
     myController      = GetComponent <PlayerControllerRigidbody>();
     rigidBody         = GetComponent <Rigidbody>();
     changeTargetTimer = changeTargetCheck;
     attackTimer       = Random.Range(0.5f, 1.5f);
 }
Esempio n. 2
0
 private void Start()
 {
     playerController = GameObject.Find("Player").GetComponent <PlayerControllerRigidbody>();
     dashAnimatior    = GameObject.Find("Dash Text").GetComponent <Animator>();
     spawnManager     = GameObject.Find("SpawnManager").GetComponent <SpawnManager>();
     roomNumber++;
     actualTimer = roomTimer;
 }
Esempio n. 3
0
 private void Start()
 {
     source      = GetComponent <AudioSource>();
     rb          = GetComponent <Rigidbody>();
     rb.velocity = (transform.forward * bulletSpeed);
     StartCoroutine(DestroyBullet());
     playerController = GameObject.Find("Player").GetComponent <PlayerControllerRigidbody>();
     spawnManager     = GameObject.Find("SpawnManager").GetComponent <SpawnManager>();
 }
Esempio n. 4
0
    private void Start()
    {
        acidCheck          = GameObject.Find("Player").GetComponent <PlayerControllerRigidbody>().groundCheck;
        screenWipeAnimator = GameObject.Find("Screen Wipe").GetComponent <Animator>();
        playerController   = GameObject.Find("Player").GetComponent <PlayerControllerRigidbody>();
        uiManager          = GameObject.Find("UIManager").GetComponent <UIManager>();

        GameObject.Find("Player").transform.position = spawnPoints[spawnCounter].position;
        GameObject.Find("Player").transform.rotation = spawnPoints[spawnCounter].rotation;

        StartCoroutine(InitialScreenWipe());
    }
Esempio n. 5
0
    private void Start()
    {
        playerRef = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>();
        Debug.Assert(playerRef, "Totem Enemy couldn't find player object to create a reference. Is there a player in the scene? Do they have the player tag?", this);
        playerRigidbody = playerRef.GetComponent <PlayerControllerRigidbody>();

        detectingSound = AudioManager.Instance.GetAudioClip("TotemDetect");
        turningSound   = AudioManager.Instance.GetAudioClip("TotemTurn");

        turnTimer        = waitTime;
        teleportPosition = teleportDestination.position;
        tweenName       += GetInstanceID();

        pebbles      = new GameObject[numPebbles];
        pebbleMeshes = new MeshRenderer[numPebbles];

        CreatePebbles();
    }
Esempio n. 6
0
    public void SpawnPlayer()
    {
        // Instantiate player
        if (isAI)
        {
            myPlayer = Instantiate(ReferenceManager.Instance.AIPlayerPrefabs[playerID], Vector3.zero, Quaternion.identity, null);
        }
        else
        {
            myPlayer = Instantiate(ReferenceManager.Instance.humanPlayerPrefabs[playerID], Vector3.zero, Quaternion.identity, null);
        }

        myPlayerComp = myPlayer.GetComponent <Player>();

        myPlayerComp.SetPlayerID(playerID);
        controller = myPlayer.GetComponent <PlayerControllerRigidbody>();

        RespawnPlayer();
    }
Esempio n. 7
0
 private void Start()
 {
     rb = GameObject.Find("Player").GetComponent <Rigidbody>();
     playerController = GameObject.Find("Player").GetComponent <PlayerControllerRigidbody>();
 }
Esempio n. 8
0
 private void Start()
 {
     controller = GetComponent <PlayerControllerRigidbody>();
 }
Esempio n. 9
0
 private void Start()
 {
     originPosition   = transform.localPosition;
     playerController = GameObject.Find("Player").GetComponent <PlayerControllerRigidbody>();
 }
Esempio n. 10
0
 private void Awake()
 {
     myController = GetComponent <PlayerControllerRigidbody>();
 }
Esempio n. 11
0
 private void Start()
 {
     playerController = GameObject.Find("Player").GetComponent <PlayerControllerRigidbody>();
     uiManager        = GameObject.Find("UIManager").GetComponent <UIManager>();
 }