示例#1
0
        void Awake()
        {
            Pathways.StateChange += new StateHandler(EventListener);
            term = new util::key((n) => {
                if (!wait && n && !term.input)
                {
                    StartCoroutine(Term());
                }
                term.input = n;
            });                                    // were in constructor



            Pathways.terminal = this;
            rect       = GetComponent <RectTransform>();
            inputField = GetComponentInChildren <ui::InputField>();
            foreach (var elem in GetComponentsInChildren <ui::Text>())
            {
                if (elem.name == "Prompt")
                {
                    elem.text = prompt;
                }
            }
            log  = GetComponentInChildren <ui::Text>();
            logs = new Queue <string>();
            Pathways.Log("init");
        }
示例#2
0
 public Window() {
     accept = new util::key((n)=> {
         if (!accept.input && n) {
             accept.input = n;
             Disable();
         } else if (!n) accept.input = n; });
 }
示例#3
0
 internal CharacterMotor()
 {
     jumping			= false;		wasJumping			= false;
     maxSpeed		= 57.2f;		massPlayer			= 80;
     dampingGround	= 30.0f;		dampingAirborne		= 20.0f;
     modSprint		= 1.6f;			modCrouch			= 0.8f;
     speedAnterior	= 16.0f;		speedPosterior		= 10.0f;
     speedLateral	= 12.0f;		speedVertical		= 1.0f;
     extraHeight		= 4.1f;			slidingSpeed		= 15.0f;
     weightPerp		= 0.0f;			weightSteep			= 0.5f;
     lastStartTime	= 0.0f;			lastEndTime			= -100.0f;
     lateralControl	= 1.0f;			speedControl		= 0.4f;
     deltaCrouch 	= 1.0f;			deltaHeight			= 2.0f;
     deltaPitch		= 0.2f;			deltaStep			= 0.3f;
     velocity		= Vector3.zero;	lastVelocity		= Vector3.zero;
     groundNormal	= Vector3.zero;	lastGroundNormal	= Vector3.zero;
     jumpDir			= Vector3.up;	inputMove			= Vector3.zero;
     hitPoint		= Vector3.zero;
     lastHitPoint 	= new Vector3(Mathf.Infinity,0,0);
     jump 			= new util::key((n)=>jump.input=n);
     dash			= new util::key((n)=>dash.input=n);
     duck 			= new util::key((n)=>duck.input=n);
     axisX 			= new util::axis((n)=>axisX.input=n);
     axisY 			= new util::axis((n)=>axisY.input=n);
 }
示例#4
0
 internal CharacterMotor()
 {
     jumping        = false;                wasJumping = false;
     maxSpeed       = 57.2f;                massPlayer = 80;
     dampingGround  = 30.0f;                dampingAirborne = 20.0f;
     modSprint      = 1.6f;                 modCrouch = 0.8f;
     speedAnterior  = 16.0f;                speedPosterior = 10.0f;
     speedLateral   = 12.0f;                speedVertical = 1.0f;
     extraHeight    = 4.1f;                 slidingSpeed = 15.0f;
     weightPerp     = 0.0f;                 weightSteep = 0.5f;
     lastStartTime  = 0.0f;                 lastEndTime = -100.0f;
     lateralControl = 1.0f;                 speedControl = 0.4f;
     deltaCrouch    = 1.0f;                 deltaHeight = 2.0f;
     deltaPitch     = 0.2f;                 deltaStep = 0.3f;
     velocity       = Vector3.zero; lastVelocity = Vector3.zero;
     groundNormal   = Vector3.zero; lastGroundNormal = Vector3.zero;
     jumpDir        = Vector3.up;   inputMove = Vector3.zero;
     hitPoint       = Vector3.zero;
     lastHitPoint   = new Vector3(Mathf.Infinity, 0, 0);
     jump           = new util::key((n) => jump.input = n);
     dash           = new util::key((n) => dash.input = n);
     duck           = new util::key((n) => duck.input = n);
     axisX          = new util::axis((n) => axisX.input = n);
     axisY          = new util::axis((n) => axisY.input = n);
 }
示例#5
0
 public PlayerMachine()
 {
     jump   = new util::key((n) => jump.input = n);
     dash   = new util::key((n) => dash.input = n);
     duck   = new util::key((n) => duck.input = n);
     axisX  = new util::axis((n) => axisX.input = n);
     axisY  = new util::axis((n) => axisY.input = n);
     mouseX = new util::axis((n) => mouseX.input = n);
     mouseY = new util::axis((n) => mouseY.input = n);
 }
示例#6
0
 public Player()
 {
     menu = new util::key((n) => menu.input = n);
     term = new util::key((n) => term.input = n);
     lamp = new util::key((n) => { lamp.input = n;
                                   if (n && left.heldItem != null && left.heldItem.held)
                                   {
                                       left.heldItem.Use();
                                   }
                          });
 }
 public ThirdPersonController()
 {
     isLookCam 				= true;
     airSpeed 				= 6.0f;		airControl 			= 2.0f;
     gravityMult 			= 2.0f;		terminalVelocity 	= 24.0f;
     moveSpeedMult			= 1.0f; 	animSpeedMult		= 1.0f;
     stationaryTurnSpeed		= 180.0f;	movingTurnSpeed 	= 360.0f;
     headLookSpeed 			= 1.0f;		groundStick 		= 5.0f;
     moveStep 				= 0.2f;		heightStep 			= 0.3f;
     crouchHeight 			= 0.6f;		//crouchChangeSpeed = 2.0f;
     autoTurnThresholdAngle	= 100.0f;	autoTurnSpeed		= 2.0f;
     jumpRepeatDelayTime 	= 0.25f;	runCycleLegOffset 	= 0.2f;
     jumpPower 				= 12.0f;	groundCheckDist 	= 0.1f;
     jump					= new util::key((n)=>jump.input=n);
     dash 					= new util::key((n)=>dash.input=n);
     duck 					= new util::key((n)=>duck.input=n);
     axisX 					= new util::axis((n)=>axisX.input=n);
     axisY 					= new util::axis((n)=>axisY.input=n);
 }
示例#8
0
 public ThirdPersonController()
 {
     isLookCam              = true;
     airSpeed               = 6.0f;         airControl = 2.0f;
     gravityMult            = 2.0f;         terminalVelocity = 24.0f;
     moveSpeedMult          = 1.0f;         animSpeedMult = 1.0f;
     stationaryTurnSpeed    = 180.0f;       movingTurnSpeed = 360.0f;
     headLookSpeed          = 1.0f;         groundStick = 5.0f;
     moveStep               = 0.2f;         heightStep = 0.3f;
     crouchHeight           = 0.6f;                              //crouchChangeSpeed = 2.0f;
     autoTurnThresholdAngle = 100.0f;       autoTurnSpeed = 2.0f;
     jumpRepeatDelayTime    = 0.25f;        runCycleLegOffset = 0.2f;
     jumpPower              = 12.0f;        groundCheckDist = 0.1f;
     jump  = new util::key((n) => jump.input = n);
     dash  = new util::key((n) => dash.input = n);
     duck  = new util::key((n) => duck.input = n);
     axisX = new util::axis((n) => axisX.input = n);
     axisY = new util::axis((n) => axisY.input = n);
 }
示例#9
0
        internal PrototypeMotor()
        {
            jumping        = false;                wasJumping = false;
            maxSpeed       = 57.2f;                massPlayer = 80;
            dampingGround  = 30.0f;                dampingAirborne = 20.0f;
            modSprint      = 1.6f;                 modCrouch = 0.8f;
            speedAnterior  = 16.0f;                speedPosterior = 10.0f;
            speedLateral   = 12.0f;                speedVertical = 1.0f;
            extraHeight    = 4.1f;                 slidingSpeed = 15.0f;
            weightPerp     = 0.0f;                 weightSteep = 0.5f;
            lastStartTime  = 0.0f;                 lastEndTime = -100.0f;
            lateralControl = 1.0f;                 speedControl = 0.4f;
            deltaCrouch    = 1.0f;                 deltaHeight = 2.0f;
            velocity       = Vector3.zero; lastVelocity = Vector3.zero;
            groundNormal   = Vector3.zero; lastGroundNormal = Vector3.zero;
            jumpDir        = Vector3.up;   inputMove = Vector3.zero;
            hitPoint       = Vector3.zero;
            lastHitPoint   = new Vector3(Mathf.Infinity, 0, 0);

            // tpc
            isLookCam              = true;
            airSpeed               = 6.0f;         airControl = 2.0f;
            gravityMult            = 2.0f;         terminalVelocity = 24.0f;
            moveSpeedMult          = 1.0f;         animSpeedMult = 1.0f;
            stationaryTurnSpeed    = 180.0f;       movingTurnSpeed = 360.0f;
            headLookSpeed          = 1.0f;         groundStick = 5.0f;
            moveStep               = 0.2f;         heightStep = 0.3f;
            crouchHeight           = 0.6f;                              //crouchChangeSpeed = 2.0f;
            autoTurnThresholdAngle = 100.0f;       autoTurnSpeed = 2.0f;
            jumpRepeatDelayTime    = 0.25f;        runCycleLegOffset = 0.2f;
            jumpPower              = 12.0f;        groundCheckDist = 0.1f;

            axisX = new util::axis((n) => axisX.input = n);
            axisY = new util::axis((n) => axisY.input = n);
            jump  = new util::key((n) => jump.input = n);
            dash  = new util::key((n) => dash.input = n);
            duck  = new util::key((n) => duck.input = n);
        }
示例#10
0
 public Lamp()
 {
     dash = new util::key((n)=>sprint=n);
 }
示例#11
0
 public Hand()
 {
     fire = new util::key((n) => fire.input = n);
     lamp = new util::key((n) => lamp.input = n);
 }
示例#12
0
 public Lamp()
 {
     dash = new util::key((n) => sprint = n);
 }
示例#13
0
        internal PrototypeMotor()
        {
            jumping			= false;		wasJumping			= false;
            maxSpeed		= 57.2f;		massPlayer			= 80;
            dampingGround	= 30.0f;		dampingAirborne		= 20.0f;
            modSprint		= 1.6f;			modCrouch			= 0.8f;
            speedAnterior	= 16.0f;		speedPosterior		= 10.0f;
            speedLateral	= 12.0f;		speedVertical		= 1.0f;
            extraHeight		= 4.1f;			slidingSpeed		= 15.0f;
            weightPerp		= 0.0f;			weightSteep			= 0.5f;
            lastStartTime	= 0.0f;			lastEndTime			= -100.0f;
            lateralControl	= 1.0f;			speedControl		= 0.4f;
            deltaCrouch 	= 1.0f;			deltaHeight			= 2.0f;
            velocity		= Vector3.zero;	lastVelocity		= Vector3.zero;
            groundNormal	= Vector3.zero;	lastGroundNormal	= Vector3.zero;
            jumpDir			= Vector3.up;	inputMove			= Vector3.zero;
            hitPoint		= Vector3.zero;
            lastHitPoint 	= new Vector3(Mathf.Infinity,0,0);

            // tpc
            isLookCam 				= true;
            airSpeed 				= 6.0f;		airControl 			= 2.0f;
            gravityMult 			= 2.0f;		terminalVelocity 	= 24.0f;
            moveSpeedMult			= 1.0f; 	animSpeedMult		= 1.0f;
            stationaryTurnSpeed		= 180.0f;	movingTurnSpeed 	= 360.0f;
            headLookSpeed 			= 1.0f;		groundStick 		= 5.0f;
            moveStep 				= 0.2f;		heightStep 			= 0.3f;
            crouchHeight 			= 0.6f;		//crouchChangeSpeed = 2.0f;
            autoTurnThresholdAngle	= 100.0f;	autoTurnSpeed		= 2.0f;
            jumpRepeatDelayTime 	= 0.25f;	runCycleLegOffset 	= 0.2f;
            jumpPower 				= 12.0f;	groundCheckDist 	= 0.1f;

            axisX = new util::axis((n)=>axisX.input=n);
            axisY = new util::axis((n)=>axisY.input=n);
            jump  = new util::key((n)=>jump.input=n);
            dash  = new util::key((n)=>dash.input=n);
            duck  = new util::key((n)=>duck.input=n);
        }
示例#14
0
 public Hand() {
     fire = new util::key((n)=>fire.input=n);
     lamp = new util::key((n)=>lamp.input=n);
 }