void Awake() { inputState = GetComponent <inputState> (); walkBehavior = GetComponent <walk> (); animator = GetComponent <Animator> (); collisionState = GetComponent <collisionState> (); duckBehavior = GetComponent <duck> (); }
void Start() { partyController = GetComponent<CharacterController>(); playerScript = Player.GetComponent<walk> (); stop = true; basePosition = transform.position; waitTime = waitBaseTime; dir = Vector3.zero; }
void Start() { partyController = GetComponent <CharacterController>(); playerScript = Player.GetComponent <walk> (); stop = true; basePosition = transform.position; waitTime = waitBaseTime; dir = Vector3.zero; }
//private SpeechBubble speechBubble; public Character(Game1 _game, GraphicsDeviceManager _graphics, ContentManager _content, String nameTex, Vector2 origin, Vector2 initGamePosition, int colums, int totFrames, int frameWidth, int frameHeight) : base(_game, _graphics, _content, nameTex, origin, initGamePosition, colums, totFrames, frameWidth, frameHeight) { thinkingBubble = new AnimatedSprite(_game, _graphics, _content, "bubble/bubble-thinking", new Vector2(0, 0), new Vector2(0, 0), 8, 8, 30, 30); esclamativeBubble = new AnimatedSprite(_game, _graphics, _content, "bubble/bubble-esclamative", new Vector2(0, 0), new Vector2(0, 0), 8, 8, 30, 30); questionBubble = new AnimatedSprite(_game, _graphics, _content, "bubble/bubble-question", new Vector2(0, 0), new Vector2(0, 0), 8, 8, 30, 30); heartBubble = new AnimatedSprite(_game, _graphics, _content, "bubble/bubble-heart", new Vector2(0, 0), new Vector2(0, 0), 8, 8, 30, 30); //speechBubble = new SpeechBubble(_game, _graphics, _content, "bubble/bubble-speech", "Fonts/speechFont", 0.5f); state = walk.NOP; isThinking = false; isSpeaking = false; }
// Start is called before the first frame update void Start() { flashLight = GameObject.Find("FlashLight"); jump1 = GameObject.Find("Jump Puzzle 1 Entrance"); jump2 = GameObject.Find("Jump Puzzle 2 Entrance"); jump3 = GameObject.Find("Jump Puzzle 3 Entrance"); tile1 = GameObject.Find("Tile Puzzle 1 Entrance"); tile2 = GameObject.Find("Tile Puzzle 2 Entrance"); walkScript = gameObject.GetComponent <walk>(); minotaurSpawnerScript = gameObject.GetComponent <minotaurSpawner>(); flashlightScript = flashLight.GetComponent <flashlight>(); }
public void setAction(walk state) { this.state = state; }
// Start is called before the first frame update public void Start() { body.gravityScale = 3.5f; body.constraints = RigidbodyConstraints2D.FreezeRotation; // BoxCollider2D //col.size = new Vector2(1, 1.5f); //col.offset = new Vector2(0, -0.25f); col = GetComponent <BoxCollider2D>(); //col.size = new Vector2(1, 2.5f); body = GetComponent <Rigidbody2D>(); runninCompass = new RunDirection("CheckDirection"); runninLegs = new RunToward(); //Doesn't have just one string that it responds to. eyes = new Look4Player("lookAround"); brain = new Brain(); chkr = new checkCollision("checkCollisions"); chase = new Chase(); patrol = new Patrol(); walkHelp = new walk("walkToFarthestEdge"); runninEyes = new Check4Edge(); transition = new SwitchState(); brain.setState(patrol); brain.setState(chase); patrol.setJob("walkToFarthestEdge"); //this should probably be separate from runToPlayer, and slower than that. Should walk to edge of plat. patrol.setJob("checkCollisions"); //checks if current velocity is 0 patrol.setJob("lookAround"); chase.setJob("CheckDirection"); chase.setJob("checkCollisions"); transition.addTrigger("edge"); transition.addTrigger("turn"); //if checkCollision tells us that we've hit a wall (which usually means turn around) we switch states. transition.addResponse("statePatrol"); brain.setComrade(walkHelp); brain.setComrade(eyes); brain.setComrade(chkr); chkr.setComrade(runninCompass); chkr.setComrade(runninLegs); runninCompass.setComrade(runninEyes); runninCompass.setComrade(transition); walkHelp.setLeader(brain); eyes.setLeader(brain); chkr.setLeader(brain); runninCompass.setLeader(runninLegs); runninLegs.setLeader(runninEyes); runninEyes.setLeader(brain); transition.setLeader(brain); chkr.setBod(body); walkHelp.setBody(body); eyes.setBody(body); runninLegs.setBody(body); runninCompass.setBody(body); runninEyes.setBody(body); runninLegs.setSpeed(sprint); walkHelp.setSpeed(speed); eyes.setFollowDist(followDist); walkHelp.set_raycast_length(raycast_length); runninEyes.set_raycast_length(raycast_length); }
void Start() { playScript = look.GetComponent <walk>(); target = look.GetComponent <Transform> (); reset = true; }
public Person(String nombre, int Edad, walk walkBehavior) { this.nombre = nombre; this.Edad = Edad; this.walkBehavior = walkBehavior; }
// Use this for initialization void Start() { instace = this; //anim = GetComponent<Animator> (); }
public void WalkingSounds(walk s) { AudioSource.PlayClipAtPoint(walk[(int)s], Vector3.zero); }
public void WalkingSounds(walk s, float volume) { AudioSource.PlayClipAtPoint(walk[(int)s], Vector3.zero, volume * GameManager.gMan.volume); }