void Start()
 {
     buttonW     = new moveForward();
     buttonA     = new moveLeft();
     buttonS     = new moveBack();
     buttonD     = new moveRight();
     buttonR     = new UndoCommand();
     buttonSpace = new jumpCommand();
 }
예제 #2
0
 void Start()
 {
     //Bind keys with commands
     buttonB = new DoNothing();
     buttonW = new moveForward();
     buttonS = new moveReverse();
     buttonA = new moveLeft();
     buttonD = new moveRight();
     buttonZ = new undoCommand();
     rb      = GetComponent <Rigidbody>();
 }
예제 #3
0
        void Start()
        {
            //Bind keys with commands
            Command moveLeft  = new moveLeft();
            Command moveRight = new moveRight();

            patrolingBehaviorCommands.Add(moveLeft);
            patrolingBehaviorCommands.Add(moveLeft);
            patrolingBehaviorCommands.Add(moveLeft);
            patrolingBehaviorCommands.Add(moveLeft);
            patrolingBehaviorCommands.Add(moveLeft);
            patrolingBehaviorCommands.Add(moveRight);
            patrolingBehaviorCommands.Add(moveRight);
            patrolingBehaviorCommands.Add(moveRight);
            patrolingBehaviorCommands.Add(moveRight);
            patrolingBehaviorCommands.Add(moveRight);
        }