public void Setup() { map = new FakeMap(Width, Height); var worldactor = new FakeActor(); world = new FakeWorld(map, worldactor); actor = new FakeActor(world); }
public DoMakeChoice(FakeAnimator anim, FakeActor ActorInstance, SpriteRenderer renderer, Action <BATTLE_ACTION_TYPE, FakeActor> OnChoice = null) { Id = "choice"; factionType = ActorInstance.factionType; opponentFactionType = ActorInstance.opponentFactionType; SpriteColour = renderer.color; this.anim = anim; this.OnChoice = OnChoice; }
public void OnHealChosen(float waitFor = 0f) { Debug.Log("Decided To Heal!"); /* Naively find a target (again not performant, but we're only testing) */ List <FakeActor> PossibleTargets = GameObject .FindObjectsOfType <FakeActor>() .Where(x => x.factionType == factionType) .ToList(); FakeActor ChosenTarget = PossibleTargets[UnityEngine.Random.Range(0, PossibleTargets.Count)]; IsComplete = true; OnChoice?.Invoke(BATTLE_ACTION_TYPE.HEAL, ChosenTarget); }
public DoHit(FakeAnimator anim, FakeActor target) { Id = "attack"; this.anim = anim; this.target = target; }
public DoHeal(FakeAnimator anim, FakeActor target) { Id = "heal"; this.anim = anim; this.target = target; }