Ejemplo n.º 1
0
    protected override EmotionState GetInitEmotionState()
    {
        initialState = new InitialEmotionState(this, "Are you looking for a castle too?");
        dateSuccessState = new DateSuccess(this, "");
        marriedCarpenterState = new MarriedCarpenter(this, "");
        carpenterFightState = new CarpenterFight(this, "");
        stoodUpState = new StoodUp(this, "");
        saneState = new SaneState(this, "");
        dateState = new Date(this, "");

        startingPosition = transform.position;
        startingPosition.y += LevelManager.levelYOffSetFromCenter;
        return (initialState);
    }
Ejemplo n.º 2
0
        CallbackResult onStoodUp(byte[] data, CallbackResult prev)
        {
            PacketReader p = new PacketReader(data);

            p.Skip(1);
            uint   serial = p.ReadUInt32();
            ushort action = p.ReadUInt16();

            if (StoodUp != null && (action == 26 || action == 11 || action == 29))
            {
                foreach (EventHandler <StoodUpEventHandlerArgs> ev in StoodUp.GetInvocationList())
                {
                    ev.BeginInvoke(this, new StoodUpEventHandlerArgs()
                    {
                        action = action, serial = serial
                    }, null, null);
                }
            }

            return(CallbackResult.Normal);
        }