public override void Interact()
 {
     if (text != null)
     {
         TextParent.SpawnText(text, transform.position + textOffset);
     }
 }
Example #2
0
    public void WaterGoDown()
    {
        TextParent.SpawnText(cheatText, PlayerManager.CurrentPlayer.transform.position);

        foreach (var water in FindObjectsOfType <Water>())
        {
            water.SetTargetLevelAndBegin(GlobalState.WaterLevel++);
        }
    }
Example #3
0
    public void CrystalIntoScope()
    {
        GlobalState.observatoryCrystalInserted = true;
        TextParent.SpawnText(cheatText, PlayerManager.CurrentPlayer.transform.position);

        var crystalSocket = GameObject.FindObjectOfType <InteractableCrystalSocket>();

        if (crystalSocket != null)
        {
            crystalSocket.SetSocketState(true);
        }
    }
Example #4
0
    private bool TryUnlockDoor()
    {
        if (!InventoryManager.Contains(key))
        {
            // We don't have the key
            TextParent.SpawnText(doorIsLockedText, transform.position + Vector3.up);

            return(false);
        }
        else
        {
            InventoryManager.Remove(key);
            GlobalState.MakeThisNotSpawn(key);
            GlobalState.observatoryDoorUnlocked = true;

            return(true);
        }
    }
Example #5
0
    public override void Interact()
    {
        if (_wasUsed)
        {
            return;
        }

        GlobalState.MakeThisNotSpawn(item);

        InventoryManager.Add(item);
        if (item?.pickupSound != null)
        {
            SFXManager.PlaySoundAt(item.pickupSound, transform.position);
        }

        TextParent.SpawnText(item.pickupText, transform.position);

        _wasUsed = true;
        StartCoroutine(AnimateIntoInventory());
    }
Example #6
0
    public override void Interact()
    {
        if (GlobalState.observatoryCrystalInserted)
        {
            if (GlobalState.ObservatoryPowered)
            {
                TextParent.SpawnText(poweredOn, transform.position);
            }
            else
            {
                TextParent.SpawnText(poweredOff, transform.position);
            }
        }
        else
        {
            if (InventoryManager.Contains(crystal))
            {
                TextParent.SpawnText(crystalInsert, transform.position);

                InventoryManager.Remove(crystal);
                GlobalState.MakeThisNotSpawn(crystal);
                GlobalState.observatoryCrystalInserted = true;

                //@TODO: Play a powering-up sound

                //@TODO: Display powering-up text

                door.Play();
            }
            else
            {
                TextParent.SpawnText(unpowered, transform.position);
            }
        }


        // @TODO: Do some animation when we have that

        SetSocketState(GlobalState.observatoryCrystalInserted);
    }
Example #7
0
 public void GiefKey()
 {
     GlobalState.MakeThisNotSpawn(key);
     TextParent.SpawnText(cheatText, PlayerManager.CurrentPlayer.transform.position);
     InventoryManager.Add(key);
 }
Example #8
0
 public void FlowerGoBig()
 {
     GlobalState.MakeThisSpawn(flower);
     TextParent.SpawnText(cheatText, PlayerManager.CurrentPlayer.transform.position);
     ToggleIngredient(flower);
 }