Ejemplo n.º 1
0
        public void Setup()
        {
            map = new FakeMap(Width, Height);
            var worldactor = new FakeActor();

            world = new FakeWorld(map, worldactor);
            actor = new FakeActor(world);
        }
Ejemplo n.º 2
0
    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;
    }
Ejemplo n.º 3
0
    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);
    }
Ejemplo n.º 4
0
 public DoHit(FakeAnimator anim, FakeActor target)
 {
     Id          = "attack";
     this.anim   = anim;
     this.target = target;
 }
Ejemplo n.º 5
0
 public DoHeal(FakeAnimator anim, FakeActor target)
 {
     Id          = "heal";
     this.anim   = anim;
     this.target = target;
 }