private void Awake()
        {
            playerAttr = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerAttributesManager>();
            anim       = GameObject.FindGameObjectWithTag("Player").GetComponent <Animator>();

            hitableMask = LayerMask.GetMask("Shootable");
        }
 void Awake()
 {
     // Setting up the references.
     anim           = GetComponent <Animator> ();
     playerMovement = GetComponent <PlayerMovement> ();
     playerAttr     = GetComponent <PlayerAttributesManager>();
 }
    private void Start()
    {
        viewMesh            = new Mesh();
        viewMesh.name       = "View Mesh";
        viewMeshFilter.mesh = viewMesh;

        playerAttr = GetComponentInParent <PlayerAttributesManager>();
    }
        float camRayLength = 100f;          // The length of the ray from the camera into the scene.
#endif

        void Awake()
        {
#if !MOBILE_INPUT
            // Create a layer mask for the floor layer.
            floorMask = LayerMask.GetMask("Floor");
#endif

            // Set up references.
            anim            = GetComponent <Animator>();
            playerRigidbody = GetComponent <Rigidbody>();
            playerAttr      = GetComponent <PlayerAttributesManager>();
        }
        void Awake()
        {
            // Create a layer mask for the Shootable layer.
            shootableMask = LayerMask.GetMask("Shootable") | LayerMask.GetMask("Obstacle");

            // Set up the references.
            gunParticles     = GetComponent <ParticleSystem> ();
            gunLine          = GetComponent <LineRenderer> ();
            gunAudio         = GetComponent <AudioSource> ();
            gunLight         = GetComponent <Light> ();
            playerAttr       = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerAttributesManager>();
            anim             = GameObject.FindGameObjectWithTag("Player").GetComponent <Animator>();
            hudAnim          = GameObject.FindGameObjectWithTag("HUD").GetComponent <Animator>();
            playerRessources = GameObject.FindGameObjectWithTag("Player").GetComponent <RessourcesManager>();
            //faceLight = GetComponentInChildren<Light> ();
        }
Example #6
0
 public override void InitializeTrait(GameObject initGameObject)
 {
     gameObject = initGameObject;
     playerAttr = gameObject.GetComponent <PlayerAttributesManager>();
     playerAttr.AddBonusStartingHealth(bonusPV);
     playerAttr.AddBonusResistance(bonusResistance);
     playerAttr.AddBonusSpeed(bonusSpeed);
     playerAttr.AddBonusRadius(bonusRadius);
     playerAttr.AddBonusPeripheralRadius(bonusPeripheralRadius);
     playerAttr.AddBonusAngle(bonusAngle);
     playerAttr.AddBonusAtkMelee(bonusAtkMelee);
     playerAttr.AddBonusMeleeCriticalChance(bonusMeleeCriticalChance);
     playerAttr.AddBonusTir(bonusTir);
     playerAttr.AddBonusReloadSpeed(bonusReloadSpeed);
     playerAttr.AddBonusTirCriticalChance(bonusTirCriticalChance);
 }