Beispiel #1
0
        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();
        }
Beispiel #2
0
 protected virtual void OnPeriodicCheck()
 {
     PeriodicCheck?.Invoke(this, EventArgs.Empty);
 }