Beispiel #1
0
    // Use this for initialization
    void Start()
    {
        sceneScript = GameObject.Find("gameManager").GetComponent <SceneManagementScript>();

        audioLib    = GameObject.Find("audioLibrary").GetComponent <audioLibrary>();
        myAudSource = gameObject.GetComponent <AudioSource>();
    }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        finalPosition = new Vector3(transform.position.x, transform.position.y - yDistDown, transform.position.z);

        audioLib    = GameObject.Find("audioLibrary").GetComponent <audioLibrary>();
        myAudSource = gameObject.GetComponent <AudioSource>();
    }
    // Use this for initialization
    void Start()
    {
        player         = GameObject.Find("Player").GetComponent <Transform>();
        playerBody     = GameObject.Find("PlayerBody").GetComponent <Transform>();
        lookTarget     = GameObject.Find("LookTarget").GetComponent <Transform>();
        bigHitMesh     = GameObject.Find("BigHit").GetComponent <MeshRenderer>();
        smallHitMesh   = GameObject.Find("SmallHit").GetComponent <MeshRenderer>();
        playerRB       = GameObject.Find("PlayerBody").GetComponent <Rigidbody>();
        SwishObj       = GameObject.Find("Swish");
        swishTrail     = GameObject.Find("Swish").GetComponent <TrailRenderer>();
        swishPivot     = GameObject.Find("SwishPivot").GetComponent <Transform>();
        playerSwishPos = playerBody.transform.position;

        swishTrail.enabled = false;

        audioLib = GameObject.Find("audioLibrary").GetComponent <audioLibrary>();

        canBigHit   = false;
        canSmallHit = false;

        performSwish = false;
        swishRight   = true;

        bigTimer   = 0;
        smallTimer = 0;

        isControllerConnected = false;
    }
Beispiel #4
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }
Beispiel #5
0
    // Use this for initialization
    void Start()
    {
        aimPointer.SetActive(false);
        player         = GameObject.Find("Player").GetComponent <Transform>();
        playerBody     = GameObject.Find("PlayerBody").GetComponent <Transform>();
        bigHitMesh     = GameObject.Find("BigHit").GetComponent <MeshRenderer>();
        smallHitMesh   = GameObject.Find("SmallHit").GetComponent <MeshRenderer>();
        playerRB       = GameObject.Find("PlayerBody").GetComponent <Rigidbody>();
        SwishObj       = GameObject.Find("Swish");
        swishTrail     = GameObject.Find("Swish").GetComponent <TrailRenderer>();
        swishPivot     = GameObject.Find("SwishPivot").GetComponent <Transform>();
        AliceRenderer  = GameObject.Find("node_id5").GetComponent <Renderer>();
        playerSwishPos = playerBody.transform.position;

        swishTrail.enabled = false;

        audioLib    = GameObject.Find("audioLibrary").GetComponent <audioLibrary>();
        myAudSource = playerBody.GetComponent <AudioSource>();

        sceneScript = GameObject.Find("gameManager").GetComponent <SceneManagementScript>();

        GameObject tempHealthFinder = GameObject.Find("pHealthContainer");

        for (int i = 0; i < HealthObj.Length; i++)
        {
            HealthObj[i] = tempHealthFinder.transform.GetChild(i).gameObject;
        }

        canBigHit   = false;
        canSmallHit = false;

        performSwish = false;
        swishRight   = true;

        bigTimer   = 0;
        smallTimer = 0;

        isControllerConnected = false;

        isInvulnerable = false;
    }