Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     isGameStarted = false;
     anim          = GetComponent <Animator>();
     myRigidBody   = GetComponent <Rigidbody2D>();
     tongue        = GetComponentInChildren <Tongue>();
 }
Exemple #2
0
 private void Awake()
 {
     viewCamera = Camera.main;
     tongue     = GetComponentInChildren <Tongue>();
     hunger     = 100f;
     jumpLength = startingMaxJumpLength;
 }
Exemple #3
0
 void ShootTongue()
 {
     if (CanUseAbilities)
     {
         float delay = mutations.Contains(Mutation.SuperTongue) ? 0.4f : 0f;
         activeTongue = Instantiate(tongue);
         activeTongue.Eject(this, body.mass, tongueDrag,
                            tongueEjectForce, tongueReturnForce, delay);
         Utils.PlayRandomClip(audioSourceHigh, audioSlurp, minPitch, maxPitch);
     }
 }
    // Use this for initialization
    void Start()
    {
        _startTime   = Time.time;
        _tongue      = _tongueObject.GetComponent <Tongue>();
        _tongueTip   = gameObject.GetComponentInChildren <TongueTip>();
        _rigidbody   = GetComponent <Rigidbody>();
        _audioSource = GetComponent <AudioSource>();

        _healthBar   = healthBarObj.GetComponent <HealthBar>();
        crosshairObj = Instantiate(crosshairPrefab);
        _crosshair   = crosshairObj.GetComponent <Crosshair>();
        UpdateHealth(_maxHealth);
    }
Exemple #5
0
 public bool TalkToNPCs(Tongue tongue)
 {
     foreach (NPC npc in _npcs)
     {
         if (tongue.Intersects(npc.CollisionBox))
         {
             npc.InConversation = true;
             SMH.WindowManager.OpenDialogTextBox(npc.ID, npc.TextID);
             return(true);
         }
     }
     return(false);
 }
Exemple #6
0
    // Use this for initialization
    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player").GetComponent<Player>();

        tongue = player.GetComponentInChildren<Tongue>();
    }
 public void TongueCollision(Tongue tongue, float damage)
 {
 }