//private Vector3Int dropoffPoint = new Vector3Int(-8, 5, 0); //private Luggage dropoffItem = new Luggage(); //private Player receiver = null; override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { customer = animator.gameObject.GetComponent <Customer>(); controller = customer.controller; this.animator = animator; pod = customer.GetComponentInParent <Pod>(); bed = pod.GetComponentInChildren <Bed>(); alarm = pod.GetComponentInChildren <DresserAlarm>(); SubscribeEvents(); //do the things necessary for the state PerformStateProcesses(); alarm.ToggleVisibility(); }
//private Player receiver = null; override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { customer = animator.gameObject.GetComponent <Customer>(); controller = customer.GetComponent <CustomerController>(); renderer = customer.GetComponent <SpriteRenderer>(); this.animator = animator; pod = customer.GetComponentInParent <Pod>(); bed = pod.GetComponentInChildren <Bed>(); blinkingTime = customer.GetChangingTime(); SubscribeEvents(); }
private new void Awake() { pod = GetComponentInParent <Pod>(); bed = pod.GetComponentInChildren <Bed>(); alarm = GetComponent <DresserAlarm>(); if (pod) { pod.DeclareThis(Label, this); } base.Awake(); }
//private Vector3Int dropoffPoint = new Vector3Int(-8, 5, 0); //private Luggage dropoffItem = new Luggage(); //private Player receiver = null; override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) { customer = animator.gameObject.GetComponent <Customer>(); controller = customer.GetComponent <CustomerController>(); this.animator = animator; pod = customer.GetComponentInParent <Pod>(); alarm = pod.GetComponentInChildren <DresserAlarm>(); checkPoint = customer.GetComponentInParent <Bed>().GetItemNode(); SubscribeEvents(); //do the things necessary for the state PerformStateProcesses(); //move the customer to the item node controller.TransportCustomer(checkPoint.GetPositionInTileMap()); }