public void BuildAttack(AllServices services) { fgService = services.GetService <IFightingGameService>(); projectServ = services.GetService <IProjectileService>(); audioServ = services.GetService <IAudioService>(); fgChar = services.GetService <IBuildService>().GetBuildingFGChar(); AttackBuilder attackBuilder = new AttackBuilder(services); builderCallback(attackBuilder); attackBuilder.BuildAttack(); name = attackBuilder.name; orientation = attackBuilder.orientation; groundRelation = attackBuilder.groundRelation; input = attackBuilder.input; priority = 1; animStateName = attackBuilder.animStateName; frames = attackBuilder.GetFrames(); hitBoxes = attackBuilder.GetHitBoxes(); tracker = new AttackTracker(frames.Count); }
public PlayerController(ScriptableObjectCharacter player, IProjectileService projectileService, float health) { _scriptableObjectCharacter = player; _projectileService = projectileService; GameObject playerObj = GameObject.Instantiate(player.playerView.gameObject); playerObj.transform.position = player.playerSpawnPosition; _playerView = playerObj.GetComponent <PlayerView>(); health = player.health; fixedPos = playerObj.transform.position; _playerView.SetPlayerController(this); SetHealthBarFirst(health); }
public NPCController(ScriptableObjectCharacter npc, IProjectileService projectileService, float health) { _scriptableObjectCharacter = npc; _projectileService = projectileService; GameObject npcObject = GameObject.Instantiate(npc.npcView.gameObject); npcObject.transform.position = npc.npcSpawnPosition; _npcView = npcObject.GetComponent <NPCView>(); health = npc.health; _npcView.SetNpcController(this); SetHealthBarFirst(health); fixedPos = npcObject.transform.position; }
public Attacks(AllServices services, Dictionary <string, AudioClip> audioMap) { audioService = services.GetService <IAudioService>(); projectileService = services.GetService <IProjectileService>(); this.audioMap = audioMap; }
public PlayerService(IProjectileService projectileService, ScriptableObjectCharacter scriptableObjectCharacter) { _characterObj = scriptableObjectCharacter; _projectileService = projectileService; SpawnPlayer(_health); }
public NPCService(IProjectileService projectileService, ScriptableObjectCharacter scriptableObjectCharacter) { _projectileService = projectileService; _characterObj = scriptableObjectCharacter; SpawnNpc(_health); }