Exemplo n.º 1
0
 void Awake()
 {
     if (type.Equals(EnumsGame.TYPE_BOX.IMAGE_BOX_RAND_VOWEL))
     {
         letter_a = GameSettings.getLowercaseVowels()[Random.Range(0, 5)];
     }
     audios = GetComponent <PlayerAudios>();
 }
 // Use this for initialization
 void Start()
 {
     anim         = transform.parent.GetComponent <Animator>();
     rgdb         = transform.parent.GetComponent <Rigidbody2D>();
     p_audios     = GetComponent <PlayerAudios>();
     p_interacts  = GetComponent <PlayerInteracts>();
     p_protect    = transform.FindChild("protect").GetComponent <SlotsProtectController>();
     p_animations = GetComponent <PlayerAnimations>();
 }
Exemplo n.º 3
0
 void Start()
 {
     rbody            = GetComponent <Rigidbody>();
     groundMask       = LayerMask.GetMask("Ground");
     torchMask        = LayerMask.GetMask("Torch");
     gManagerScript   = gManagerRef.GetComponent <Game_Manager>();
     isBuilding       = false;
     health           = maxHealth;
     defaultMoveSpeed = moveSpeed;
     buildMoveSpeed   = moveSpeed * 0.6f;
     mousePos         = Vector3.zero;
     hutRef           = GameObject.FindGameObjectWithTag("Hut");
     regenCooldown    = Time.time + regenDelay;
     anim             = GetComponent <Animator>();
     audios           = GetComponent <PlayerAudios>();
 }