Exemple #1
0
    private void Awake()
    {
        image = GetComponent <Image>();
        bed   = GetComponentInParent <DresserAlarm>();

        if (bed != null)
        {
            bed.DeclareThis(label, this);
        }
    }
Exemple #2
0
    private new void Awake()
    {
        pod   = GetComponentInParent <Pod>();
        bed   = pod.GetComponentInChildren <Bed>();
        alarm = GetComponent <DresserAlarm>();

        if (pod)
        {
            pod.DeclareThis(Label, this);
        }

        base.Awake();
    }
Exemple #3
0
    //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();
    }
Exemple #4
0
    //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());
    }