private void Awake() { walkToState = new WalkTo(this); openLiftState = new OpenLift(this); GameObject[] temp = GameObject.FindGameObjectsWithTag("Waypoint"); for (int t = 0; t < temp.Length; t++) { wayPoints.Add(temp[t].transform); } navMeshAgent = GetComponent <UnityEngine.AI.NavMeshAgent>(); }
void Start() { CombatController.Instance.AddUnitToTeam(this); animator = GetComponent <Animator> (); walkToComponent = GetComponent <WalkTo> (); }
public PlayerActions(Game game) : base(game) { this.UpdateOrder = 1; WalkTo walkTo = new WalkTo(game); ServiceHelper.InjectServices((object)walkTo); ServiceHelper.AddComponent((IGameComponent)walkTo, true); if (walkTo.UpdateOrder == 0) { this.LightActions.Add((PlayerAction)walkTo); walkTo.Enabled = false; } this.AddAction((PlayerAction) new Fall(game)); this.AddAction((PlayerAction) new Idle(game)); this.AddAction((PlayerAction) new DropDown(game)); this.AddAction((PlayerAction) new LowerToStraightLedge(game)); this.AddAction((PlayerAction) new Land(game)); this.AddAction((PlayerAction) new Slide(game)); this.AddAction((PlayerAction) new Lift(game)); this.AddAction((PlayerAction) new Jump(game)); this.AddAction((PlayerAction) new WalkRun(game)); this.AddAction((PlayerAction) new Bounce(game)); this.AddAction((PlayerAction) new ClimbLadder(game)); this.AddAction((PlayerAction) new ReadSign(game)); this.AddAction((PlayerAction) new FreeFall(game)); this.AddAction((PlayerAction) new Die(game)); this.AddAction((PlayerAction) new Victory(game)); this.AddAction((PlayerAction) new GrabCornerLedge(game)); this.AddAction((PlayerAction) new PullUpFromCornerLedge(game)); this.AddAction((PlayerAction) new LowerToCornerLedge(game)); this.AddAction((PlayerAction) new Carry(game)); this.AddAction((PlayerAction) new Throw(game)); this.AddAction((PlayerAction) new DropTrile(game)); this.AddAction((PlayerAction) new Suffer(game)); this.AddAction((PlayerAction) new EnterDoor(game)); this.AddAction((PlayerAction) new Grab(game)); this.AddAction((PlayerAction) new Push(game)); this.AddAction((PlayerAction) new SuckedIn(game)); this.AddAction((PlayerAction) new ClimbVine(game)); this.AddAction((PlayerAction) new WakingUp(game)); this.AddAction((PlayerAction) new Jetpack(game)); this.AddAction((PlayerAction) new OpenTreasure(game)); this.AddAction((PlayerAction) new OpenDoor(game)); this.AddAction((PlayerAction) new Swim(game)); this.AddAction((PlayerAction) new Sink(game)); this.AddAction((PlayerAction) new LookAround(game)); this.AddAction((PlayerAction) new Teeter(game)); this.AddAction((PlayerAction) new EnterTunnel(game)); this.AddAction((PlayerAction) new PushPivot(game)); this.AddAction((PlayerAction) new PullUpFromStraightLedge(game)); this.AddAction((PlayerAction) new GrabStraightLedge(game)); this.AddAction((PlayerAction) new ShimmyOnLedge(game)); this.AddAction((PlayerAction) new ToCornerTransition(game)); this.AddAction((PlayerAction) new FromCornerTransition(game)); this.AddAction((PlayerAction) new ToClimbTransition(game)); this.AddAction((PlayerAction) new ClimbOverLadder(game)); this.AddAction((PlayerAction) new PivotTombstone(game)); this.AddAction((PlayerAction) new EnterPipe(game)); this.AddAction((PlayerAction) new ExitDoor(game)); this.AddAction((PlayerAction) new LesserWarp(game)); this.AddAction((PlayerAction) new GateWarp(game)); this.AddAction((PlayerAction) new SleepWake(game)); this.AddAction((PlayerAction) new ReadTurnAround(game)); this.AddAction((PlayerAction) new BellActions(game)); this.AddAction((PlayerAction) new Crush(game)); this.AddAction((PlayerAction) new PlayingDrums(game)); this.AddAction((PlayerAction) new Floating(game)); this.AddAction((PlayerAction) new Standing(game)); ServiceHelper.AddComponent((IGameComponent) new PlayerActions.ActionsManager(game, this)); }