コード例 #1
0
 // allows for assigning variables (like above) without making this a scriptable object
 public MoveCameraTransform(VariablesHolder vh)
 {
     varHolder       = vh;
     cameraTransform = varHolder.cameraTransform;
     horizontal      = varHolder.horizontalInput;
     vertical        = varHolder.verticalInput;
 }
コード例 #2
0
        public override void Init()
        {
            VariablesHolder gameVars = Resources.Load("GameVariables") as VariablesHolder;

            State interactions = new State(); // player interactions

            interactions.actions.Add(new InputManager(gameVars));
            interactions.actions.Add(new HandleMouseInteractions());
            interactions.actions.Add(new MoveCameraTransform(gameVars));

            State wait       = new State(); // does nothing atm
            State moveOnPath = new State();

            moveOnPath.actions.Add(new MoveCharacterOnPath());

            currState     = interactions;
            startingState = interactions;

            allStates.Add("moveOnPath", moveOnPath);
            allStates.Add("interactions", interactions);
            allStates.Add("wait", wait);
        }
コード例 #3
0
 public InputManager(VariablesHolder vh)
 {
     varHolder = vh;
 }