Exemple #1
0
    void Start()
    {
        GrabBuildingStats = SellMenu.GetComponent <GrabBuildingStats>();
        SelectedBuilding  = PrefabBase;

        gameControllerScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameControllerScript>();
        grabPlayerStats      = GameObject.FindGameObjectWithTag("PlayerStats").GetComponent <GrabPlayerStats>();
    }
    // Use this for initialization
    void Start()
    {
        cameraController = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraController>();
        cameraController.NewPlayer();
        Flash       = Gun.transform.GetComponentInChildren <ParticleSystem>();
        NewPosition = transform.position;
        shootScript = GetComponent <PlayerShootScript>();
        GameObject player = GameObject.FindGameObjectWithTag("Player");

        playerStats     = player.GetComponent <PlayerStats>();
        healthScript    = player.GetComponent <HealthScript>();
        grabPlayerStats = GameObject.FindGameObjectWithTag("PlayerStats").GetComponent <GrabPlayerStats>();
        grabPlayerStats.NewPlayer();
        Flash.Stop();
        //Grabbing Necassary Components
        MyAnimator   = GetComponent <Animator>();
        NavMeshAgent = GetComponent <NavMeshAgent>();

        //Setting state to Idle
        EPlayerState = PlayerState.Idle;

        StartCoroutine(Alive());
    }
 void Start()
 {
     grabPlayerStats = GameObject.FindGameObjectWithTag("PlayerStats").GetComponent <GrabPlayerStats>();
     NewPlayer();
     Child.SetActive(false);
 }
Exemple #4
0
 void Start()
 {
     gameControllerScript = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameControllerScript>();
     grabPlayerStats      = GameObject.FindGameObjectWithTag("PlayerStats").GetComponent <GrabPlayerStats>();
     Child.SetActive(false);
 }
 void Start()
 {
     grabPlayerStats = GameObject.FindGameObjectWithTag("PlayerStats").GetComponent <GrabPlayerStats>();
 }