Example #1
0
    public override void Update()
    {
        if (currentInstruction == null && Instructions.Count > 0)
        {
            currentInstruction = Instructions.First.Value;
            Instructions.RemoveFirst();
        }

        //TODO: do the next instruction here
        if (currentInstruction != null)
        {
            if (currentInstruction.TriggerTime < world.currTime)
            {
                #region Instructiontriggering

                string convertedInstruction = currentInstruction.GetType().ToString();
                switch (convertedInstruction)
                {
                case "InstructionAnimationPlay":
                    ExecAnimationPlayInst();
                    break;

                case "InstructionCommand":
                    ExecCommandInst();
                    break;

                case "InstructionCoversationStart":
                    ExecConversationStartInst();
                    break;

                case "InstructionData":
                    ExecDataInst();
                    break;

                case "InstructionFindWayTo":
                    ExecFindWayToInst();
                    break;

                case "InstructionInteractionWith":
                    ExecInteractionWithInst();
                    break;

                case "InstructionLookAround":
                    ExecLookAroundInst();
                    break;

                case "InstructionLookAt":
                    ExecLookAtInst();
                    break;

                case "InstructionLookOut":
                    ExecLookOutInst();
                    break;

                case "InstructionMovement":
                    ExecMovementInst();
                    break;

                case "InstructionWait":
                    ExecWaitInst();
                    break;

                default:
                    break;
                }
                #endregion
            }
        }
        //Check if i should do the instruction

        //TODO: Check if next Instruction ist up

        //TODO: If so execute curesponding to it

        //TODO: Do some more commentating about not excisting stuff
    }