public FollowState(GameObject leader, Ship leaderController, float maxVelocity, NpcType typeToDetect) { this.leader = leader; this.leaderController = leaderController; this.maxVelocity = 30; this.typeToDetect = typeToDetect; npcDetector = new NPCDetector(); stateID = StateID.BotFollowStateID; }
public WanderState(GameObject npc, Vector3 velocity, NpcType typeToDetect, float detectrange, Transform gunTipPosition) { this.velocity = npc.transform.forward * MaxSpeed; this.startPosition = npc.transform.position; this.detectrange = detectrange; this.typeToDetect = typeToDetect; this.gunTipPosition = gunTipPosition; npcDetector = new NPCDetector(); randomAngle = Random.rotation; stateID = StateID.EnemyWanderStateID; }