コード例 #1
0
    void Start()
    {
        wld_HealthDmg         = this.GetComponent <WLD_HealthDmg>();
        plr_CharacterMovement = GetComponent <PLR_CharacterMovement>();
        plr_Points            = GetComponent <PLR_Points>();
        rb = plr_CharacterMovement.RB;
        startingMoveSpeed = plr_CharacterMovement.MovingSpeed;

        currentTime = 0;

        if (WLD_GameController.activeLevel == WLD_GameController.levels[Scenes.Hub])
        {
            msg = GameObject.Find("LevelSpecificUI/EndPieceLoreSystem").GetComponent <UI_EndPieceMsgSystem>();
        }
        else
        {
            msg = GameObject.FindObjectOfType <UI_EndPieceMsgSystem>();
        }

        hashIDs = FindObjectOfType <UNA_HashIDs>();

        anim = transform.GetChild(1).GetChild(0).GetComponent <Animator>();

        Debug.Log(anim.gameObject.name);
    }//End Start
コード例 #2
0
    private void Start()
    {
        charMove      = GetComponent <PLR_CharacterMovement>();
        originalSpeed = charMove.MovingSpeed;

        anim    = charMove.anim;
        hashIDs = FindObjectOfType <UNA_HashIDs>();

        animatorSpeed = anim.speed;

        audioSource = GetComponent <AudioSource>();
    }
コード例 #3
0
    // ------------------------------------------------------------------------------
    // Function Name: 
    // Return types: 
    // Argument types: 
    // Author: 
    // Date: 
    // ------------------------------------------------------------------------------
    // Purpose: 
    // ------------------------------------------------------------------------------

    private void Start()
    {
        curTime = fireRate;
        selfCurTime = selfFireRate;

        Material[] tempGunMaterials = gunObject.GetComponent<Renderer>().materials;
        gunMaterial = tempGunMaterials[1];

        audioSource = GetComponent<AudioSource>();

        hashIDs = FindObjectOfType<UNA_HashIDs>();
        anim = WLD_GameController.player.GetComponent<PLR_CharacterMovement>().anim;

    }
コード例 #4
0
    void Awake()
    {
        rb = GetComponent <Rigidbody>();
        //lL = FindObjectOfType<WLD_LevelLoader>(); //Ref to levelLoader script - will need to update to ref specific Teleporter's Segement selection later
        //Added to test InvertedGravity
        player_grv_individualGravity = this.GetComponent <GRV_IndividualGravity>();
        //Finish Add
        //plr_Jump = GetComponent<PLR_Jump>();
        plr_Shoot    = FindObjectOfType <PLR_Shoot>();
        healthScript = this.GetComponent <WLD_HealthDmg>();

        rb.isKinematic = false;
        rb.useGravity  = false;

        isFrozen = false;

        hashIDs = FindObjectOfType <UNA_HashIDs>();
        anim    = playerGFX.GetComponentInChildren <Animator>();
    }
コード例 #5
0
    // ------------------------------------------------------------------------------
    // FUNCTIONS
    // ------------------------------------------------------------------------------
    void Start()
    {
        player = WLD_GameController.player;

        UNA_StaticVariables.tempDmgOn = false;
        timer = 0;

        startingHealth = maxHealth;

        rb = GetComponent<Rigidbody>();
        WLD_GameController.ui_Texts[UI_Txt.DamageText].enabled = false;
        WLD_GameController.ui_Texts[UI_Txt.CurrentHealthText].color = Color.black;
        //ParticleSystem.EmissionModule em = ps.emission;
        //em.enabled = true;

        if (gameObject == player)
        {
            hashIDs = FindObjectOfType<UNA_HashIDs>();
            anim = player.GetComponent<PLR_CharacterMovement>().anim;
            damageAudioSource = GetComponent<AudioSource>();

        }

    }