Beispiel #1
0
 public void NewSconceRevealedWrapper(Sconce sconce, HiddenSconce hiddenSconce)
 {
     if (NewSconceRevealed != null)
     {
         NewSconceRevealed(sconce, hiddenSconce);
     }
 }
Beispiel #2
0
 void ArrivedAtPreviousSconceWrapper(Sconce sconce)
 {
     if (ArrivedAtPreviousSconce != null)
     {
         ArrivedAtPreviousSconce(sconce);
     }
 }
Beispiel #3
0
 void Awake()
 {
     renderer                     = GetComponent <MeshRenderer>();
     player                       = GameHandler.playerGO;
     FatherOrbPos                 = player.transform.Find("FatherOrbPos");
     durationHeld                 = 35.0f;
     durationBeforeFizzing        = 25.0f;
     durationBeforeRedHot         = 30.0f;
     durationBeforeCritical       = 33.0f;
     Memory.RefreshGiven         += RefreshTime;
     Sconce.OrbInSconce          += this.PlayerDroppedOrb;
     Sconce.OrbInSconce          += this.EnteredSconce;
     Sconce.OrbRemovedFromSconce += this.PickedUpByPlayer;
     //you want a successful parry to refresh the orb time -- maybe a failure should too so it's not a double fail? Or have the failure make the orb return to sconce early w/ out burn
     PromptPlayerHit.PlayerParried += RefreshTime;
     PromptPlayerHit.PlayerFailed  += FailureDelayWrapper;
     //TODO: Fix the below
     OrbController.ManuallyStoppedChannelingOrb += PickedUpByPlayer;
     //TODO: Add for if the orb remains charged w/ power up even when it is not in the player's hands
     if (transform.parent != null)
     {
         Sconce sconce = transform.parent.GetComponent <Sconce>();
         sconce.OrbPlacedInUs(sconce);
         SetZToNegative2();
     }
     CorruptedObject.Corrupting        += BeCorrupted;
     CorruptedObject.StoppedCorrupting += SetCorruptionSourceRemoved;
     //posOffset = transform.position;
     //SetInSconce(transform.parent.gameObject);
 }
Beispiel #4
0
 void SetInSconce(Sconce sconce)
 {
     //sconce.GetComponent<Sconce>().OrbPlacedInUs();
     heldStatus       = HeldStatuses.InSconce;
     currentSconce    = sconce;
     inSconce         = true;
     transform.parent = sconce.transform;
     //transform.localPosition = Vector3.zero;
     SetZToNegative2();
     instabilityStatus = InstabilityStatus.NotPickedUp;
 }
Beispiel #5
0
    void RevealSconce()
    {
        //play some animation
        Sconce revealedSconce = sconceToReveal.GetPooledInstance <Sconce>();

        revealedSconce.transform.position = transform.position;
        //sconceToRevealGO.SetActive(true);
        //sconceToRevealGO.transform.parent = null;
        revealedSconce.OrbPlacedInUs(revealedSconce);
        SconceWasRevealed();
        NewSconceRevealedWrapper(revealedSconce, this);
        gameObject.SetActive(false);
    }
Beispiel #6
0
 public void PickedUpByPlayer(MonoBehaviour ourObject)
 {
     heldStatus = HeldStatuses.Carried;
     inSconce   = false;
     if (ourObject.GetComponent <Sconce>() != null)
     {
         previousSconce = currentSconce;
         currentSconce  = null;
     }
     instabilityStatus = InstabilityStatus.FreshPickedUp;
     StartCoroutine(MoveUs(transform.position, GameHandler.fatherOrbHoldTransform.position, GameHandler.player));
     transform.parent = player.transform;
     //posOffset = transform.localPosition;
     if (PickedUp != null)
     {
         PickedUp(this);
     }
     StartCoroutine(BeingCarried());
 }