Ejemplo n.º 1
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();
    }
Ejemplo n.º 2
0
    //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();
    }
Ejemplo n.º 3
0
    private new void Awake()
    {
        pod   = GetComponentInParent <Pod>();
        bed   = pod.GetComponentInChildren <Bed>();
        alarm = GetComponent <DresserAlarm>();

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

        base.Awake();
    }
Ejemplo n.º 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());
    }