Corgi Engine v9.4
Loading...
Searching...
No Matches
MoreMountains.CorgiEngine.GoToLevelEntryPoint Class Reference

A class used to go from one level to the next while specifying an entry point in the target level. Entry points are defined in each level's LevelManager component. They're simply Transforms in a list. The index in the list is the identifier for the entry point. More...

Inheritance diagram for MoreMountains.CorgiEngine.GoToLevelEntryPoint:
MoreMountains.CorgiEngine.FinishLevel MoreMountains.CorgiEngine.ButtonActivated MoreMountains.Tools.MMMonoBehaviour

Public Member Functions

override void GoToNextLevel ()
 Loads the next level and stores the target entry point index in the game manager.
Public Member Functions inherited from MoreMountains.CorgiEngine.FinishLevel
override void Initialization ()
 On initialization, we init our delay.
override void TriggerButtonAction (GameObject instigator)
 When the button is pressed we start the dialogue.
Public Member Functions inherited from MoreMountains.CorgiEngine.ButtonActivated
virtual void MakeActivable ()
 Makes the zone activable.
virtual void MakeUnactivable ()
 Makes the zone unactivable.
virtual void ToggleActivable ()
 Makes the zone activable if it wasn't, unactivable if it was activable.
virtual void TriggerExitAction (GameObject collider)
 On exit, we reset our staying bool and invoke our OnExit event.
virtual void PromptError ()
 Triggers an error.
virtual void ShowPrompt ()
 Shows the button A prompt.
virtual void HidePrompt ()
 Hides the button A prompt.
virtual void DisableZone ()
 Enables the button activated zone.
virtual void EnableZone ()
 Enables the button activated zone.
virtual bool CheckNumberOfUses ()
 Checks the remaining number of uses and eventual delay between uses and returns true if the zone can be activated.

Public Attributes

int PointOfEntryIndex
 the index of the target point of entry to spawn at in the next level
Character.FacingDirections FacingDirection = Character.FacingDirections.Right
 the direction to face in the next level
Public Attributes inherited from MoreMountains.CorgiEngine.FinishLevel
string LevelName
 the (exact) name of the level to go to
float DelayBeforeTransition = 0f
 the delay (in seconds) before actually redirecting to a new scene
bool TriggerFade = false
 if this is true, a fade to black will occur when teleporting
int FaderID = 0
 the ID of the fader to target
MMTweenType FadeTween = new MMTweenType(MMTween.MMTweenCurve.EaseInCubic)
 the curve to use to fade to black
bool FreezeTime = false
 whether or not time should be frozen during the transition
bool FreezeCharacter = true
 whether or not the character should be frozen (input blocked) for the duration of the transition
Public Attributes inherited from MoreMountains.CorgiEngine.ButtonActivated
ButtonActivatedRequirements ButtonActivatedRequirement = ButtonActivatedRequirements.Either
 the requirement(s) for this zone
bool RequiresPlayerType = true
 if this is true, this can only be activated by player Characters
bool RequiresButtonActivationAbility = true
 if this is true, this zone can only be activated if the character has the required ability
bool PreventJumpsWhileInThisZone = false
 if this is true, characters won't be able to jump when in that zone, regardless of the settings on their CharacterButtonActivation ability
bool Activable = true
 if this is false, the zone won't be activable
bool AutoActivation = false
 if true, the zone will activate whether the button is pressed or not
bool AutoActivationAndButtonInteraction = false
 if true, this zone will be auto activated but will still allow button interaction
bool CanOnlyActivateIfGrounded = false
 if this is set to false, the zone won't be activable while not grounded
bool ShouldUpdateState = true
 Set this to true if you want the CharacterBehaviorState to be notified of the player's entry into the zone.
bool OnlyOneActivationAtOnce = true
 if this is true, enter won't be retriggered if another object enters, and exit will only be triggered when the last object exits
bool AlsoPerformChecksOnStay = false
 if this is true, extra enter checks will be performed on TriggerStay, to handle edge cases like a zone that'd prevent activation when not grounded, and a character enters it airborne, but then lands
LayerMask TargetLayerMask = ~0
 a layermask with all the layers that can interact with this specific button activated zone
bool UnlimitedActivations = true
 if this is set to false, your number of activations will be MaxNumberOfActivations
int MaxNumberOfActivations = 0
 the number of times the zone can be interacted with
float DelayBetweenUses = 0f
 the delay (in seconds) after an activation during which the zone can't be activated
bool DisableAfterUse = false
 if this is true, the zone will disable itself (forever or until you manually reactivate it) after its last use
InputTypes InputType = InputTypes.Default
 the selected input type (default : default binding from the InputManager for Interact, button (type in an axis button name), or key)
string InputButton = "Interact"
 the button axis name to use for this button activated object
KeyCode InputKey = KeyCode.Space
 the key to use for this
string AnimationTriggerParameterName
 an (absolutely optional) animation parameter that can be triggered on the character when activating the zone
bool UseVisualPrompt = true
 if this is true, a prompt will be shown if setup properly
ButtonPrompt ButtonPromptPrefab
 the gameobject to instantiate to present the prompt
string ButtonPromptText = "A"
 the text to display in the button prompt
Color ButtonPromptColor = MMColors.LawnGreen
 the text to display in the button prompt
Color ButtonPromptTextColor = MMColors.White
 the color for the prompt's text
bool AlwaysShowPrompt = true
 If true, the "buttonA" prompt will always be shown, whether the player is in the zone or not.
bool ShowPromptWhenColliding = true
 If true, the "buttonA" prompt will be shown when a player is colliding with the zone.
bool HidePromptAfterUse = false
 If true, the prompt will hide after use.
Vector3 PromptRelativePosition = Vector3.zero
 the position of the actual buttonA prompt relative to the object's center
MMFeedbacks ActivationFeedback
 a feedback to play when the zone gets activated
MMFeedbacks DeniedFeedback
 a feedback to play when the zone tries to get activated but can't
MMFeedbacks EnterFeedback
 a feedback to play when the zone gets entered
MMFeedbacks ExitFeedback
 a feedback to play when the zone gets exited
UnityEvent OnActivation
 an action to trigger when this gets activated
UnityEvent OnExit
 an action to trigger when exiting this zone
UnityEvent OnStay
 an action to trigger when staying in the zone

Additional Inherited Members

Public Types inherited from MoreMountains.CorgiEngine.ButtonActivated
enum  ButtonActivatedRequirements { Character , ButtonActivator , Either , None }
 the different possible requirements for this activated zone, which can be either a character, a button activator, one or the other, or none More...
enum  InputTypes { Default , Button , Key }
 how input gets detected for this zone (default : default binding from the InputManager for Interact, button (type in an axis button name), or key) More...
Protected Member Functions inherited from MoreMountains.CorgiEngine.FinishLevel
virtual IEnumerator GoToNextLevelCoroutine ()
 A coroutine used to handle the finish level sequence.
Protected Member Functions inherited from MoreMountains.CorgiEngine.ButtonActivated
virtual void OnEnable ()
 On Enable, we initialize our ButtonActivated zone.
virtual void OnDisable ()
 On disable we disable our input action if needed.
virtual void ActivateZone ()
 Activates the zone.
virtual void DisableAfterActivation ()
 Handles the disabling of the zone after activation.
virtual void OnTriggerEnter2D (Collider2D collidingObject)
 Handles enter collision with 2D triggers.
virtual void OnTriggerStay2D (Collider2D collidingObject)
 On stay we invoke our stay event if needed, and perform a trigger enter check if it hasn't been done already.
virtual void OnTriggerExit2D (Collider2D collidingObject)
 Handles enter collision with 2D triggers.
virtual void TriggerEnter (GameObject collider)
 Triggered when something collides with the button activated zone.
virtual void TriggerExit (GameObject collider)
 Triggered when something exits the water.
virtual bool TestForLastObject (GameObject collider)
 Tests if the object exiting our zone is the last remaining one.
virtual bool CheckConditions (GameObject collider)
 Determines whether or not this zone should be activated.
Protected Attributes inherited from MoreMountains.CorgiEngine.FinishLevel
WaitForSeconds _delayWaitForSeconds
Character _character
Protected Attributes inherited from MoreMountains.CorgiEngine.ButtonActivated
Animator _buttonPromptAnimator
ButtonPrompt _buttonPrompt
bool _promptHiddenForever = false
int _numberOfActivationsLeft
float _lastActivationTimestamp
Collider2D _buttonActivatedZoneCollider
CharacterButtonActivation _characterButtonActivation
Character _currentCharacter
List< GameObject > _collidingObjects
List< GameObject > _stayingGameObjects
List< Collider2D > _enteredColliders
int _inputActionPressedAtFrame
Properties inherited from MoreMountains.CorgiEngine.ButtonActivated
bool InputActionPerformed [get]

Detailed Description

A class used to go from one level to the next while specifying an entry point in the target level. Entry points are defined in each level's LevelManager component. They're simply Transforms in a list. The index in the list is the identifier for the entry point.

Member Function Documentation

◆ GoToNextLevel()

override void MoreMountains.CorgiEngine.GoToLevelEntryPoint.GoToNextLevel ( )
virtual

Loads the next level and stores the target entry point index in the game manager.

Reimplemented from MoreMountains.CorgiEngine.FinishLevel.

Member Data Documentation

◆ FacingDirection

Character.FacingDirections MoreMountains.CorgiEngine.GoToLevelEntryPoint.FacingDirection = Character.FacingDirections.Right

the direction to face in the next level

◆ PointOfEntryIndex

int MoreMountains.CorgiEngine.GoToLevelEntryPoint.PointOfEntryIndex

the index of the target point of entry to spawn at in the next level


The documentation for this class was generated from the following file: