/// <summary> /// Element Effect. An EffectTransformation object type is returned with the modification applied by the effect. /// The EffectTransformation object indicates the new direction(<see cref="newDirection"/>) for the Player. /// </summary> /// <param name="isTreated">true = the element is treated definitively. / false = the element effect may be requested again.</param> public override EffectTransformation Effect(bool isTreated = false) { EffectTransformation eTransf = new EffectTransformation (); eTransf.newDirection = newDirection; eTransf.newPosition = transform.position; return eTransf; }
public override EffectTransformation Effect(bool isTreated = false) { EffectTransformation effect = new EffectTransformation (); effect.isEnergy = true; energy.AddEnergy (); return effect; }
/// <summary> /// Element Effect. An EffectTransformation object type is returned with the modification applied by the effect. /// If the bridge is down (closed), the EffectTransformation object indicates that the element is water. /// If the bridge is up (opened), there is no effect. /// </summary> /// <param name="isTreated">true = the element is treated definitively. / false = the element effect may be requested again.</param> public override EffectTransformation Effect(bool isTreated = false) { EffectTransformation effect = new EffectTransformation(); if (!this.isDown) { effect.isWater = true; return effect; } return new EffectTransformation(false); }
/// <summary> /// Element Effect. An EffectTransformation object type is returned with the modification applied by the effect. /// The EffectTransformation contain the position of the associated teleporter. /// </summary> /// <param name="isTreated">true = the element is treated definitively. / false = the element effect may be requested again.</param> public override EffectTransformation Effect(bool isTreated = false) { if (AssociatedTeleporter!=null && DeactivatedTime<=0) { EffectTransformation eTransf = new EffectTransformation (); eTransf.newPosition = AssociatedTeleporter.transform.position; AssociatedTeleporter.Deactivate(10); return eTransf; } return new EffectTransformation(false); }
/// <summary> /// Return the effect of the square. If there are no more objectives to pick, the player win /// </summary> public override EffectTransformation Effect(bool isTreated = false) { EffectTransformation effect = new EffectTransformation (); effect.isObjectif = true; if (nbobjectif<=0) { effect.isChangingSomething = true; effect.isWinner = true; } return effect; }
/// <summary> /// return the effect of this element. If isTreated, decrement the objectives count in the finalCase /// </summary> /// <param name="isTreated">If set to <c>true</c> the objective is pick.</param> /// <returns> EffectTransformation that isObjectif</returns> public override EffectTransformation Effect(bool isTreated = false) { EffectTransformation effect = new EffectTransformation (); effect.isObjectif = true; if (isTreated) { FinalCase.PickObjectif(); } return effect; }
private void TreatmentIfObstacle(EffectTransformation eTransf) { if (eTransf.isObstacle && playerAssociated!=null) playerAssociated.Explode(); }
public override EffectTransformation Effect(bool isTreated = false) { EffectTransformation effect = new EffectTransformation (); effect.isObjectif = true; return effect; }
public override EffectTransformation Effect(bool isTreated = false) { EffectTransformation effect = new EffectTransformation (); effect.isStartingJump = true; return effect; }