示例#1
0
    public void SetInputType(LocalInputType.InputType inputtype)
    {
        switch (inputtype)
        {
        case LocalInputType.InputType.NONE:
            inputController = null;
            break;

        case LocalInputType.InputType.HUMAN:
            inputController = new LocalInputHuman();
            break;

        case LocalInputType.InputType.AI:
            inputController = new LocalInputAI();
            break;

        case LocalInputType.InputType.SCRIPTED:
            inputController = new LocalInputScripted();
            break;
        }

        if (inputController != null)
        {
            inputController.SetOwner(this);
        }

        subAllInputTypeChanged.NotifyObs(this, inputtype);
    }
示例#2
0
 public LocalInput(LocalInputType type)
 {
     this.type = type;
 }
示例#3
0
 public LocalInput(LocalInputType type)
 {
     this.type = type;
 }