public bool IsValid(GameObject p_owner) { IHasTarget hasTarget = p_owner.GetComponent <IHasTarget>(); Assert.IsNotNull(hasTarget, "This component must implements IHasTarget."); return(hasTarget?.GetTarget() != null); }
public override void Handle(IHasTarget <Frostspark.API.Entities.Player> obj) { var fsplayer = obj.Target as Frostspark.Server.Entities.Player; //Don't lock the player up when they're logged in. if (fsplayer.IsLoggedIn()) { return; } //If this is an event we're not supposed to handle, don't handle it. if (DontHandle.Contains(obj.GetType())) { return; } //Otherwise, if this event is cancellable, cancel it. if (obj is ICancellable cancellable) { cancellable.Cancelled = true; } }
public SelectCharacterInteraction(IHasTarget p_hasTarget) { _hasTarget = p_hasTarget; }
public override bool Filter(IHasTarget <Frostspark.API.Entities.Player> t) { return(EventManager.PlayerImmobiliseEventFilter(t.Target)); }
void Awake() { animator = GetComponent <Animator>(); camera = Camera.main; target = GetComponent <IHasTarget>(); }
void Awake() { attackerAI = GetComponent <IHasTarget>(); myBody = GetComponent <Rigidbody2D>(); }