public virtual void Start() { // set room layer mask roomLayerMask = LayerMask.GetMask("Aimable"); // set periodic check onPeriodicCheck += CheckCurrentRoom; // set state state = State.Idle; // set crewmember's ship ship = GetComponentInParent <Ship>(); ship.onShipDestroyed += Destroy; // get pathfinder path = this.GetComponent <PathFinding>(); // get pawn ui manager pawnUI = this.GetComponent <PawnUIManager>(); isDestinationSet = false; // set crewmember initial stats SetupMemberStats(); // set health and progress bar SetupUIElements(); }
protected virtual void OnPeriodicCheck() { PeriodicCheck?.Invoke(this, EventArgs.Empty); }