Exemplo n.º 1
0
 private void DisplayState(BattalionStateVisuals visuals)
 {
     if (visuals == null)
     {
         primaryVisual.SetActive(false);
         return;
     }
     primaryVisual.SetActive(true);
     hitpoints.text = GetHPText(visuals.State);
     moral.text     = GetMPText(visuals.State);
     PlaceVisual(visuals);
 }
Exemplo n.º 2
0
    private void PlaceVisual(BattalionStateVisuals visuals)
    {
        float xPos    = visuals.State.Position.X;
        float sideVal = visuals.Side == BattleSide.Left ? -1 : 1;

        xPos += .5f;
        xPos *= sideVal;
        float zPos = visuals.State.Position.Y;

        zPos -= zPos > 0 ? .5f : -.5f;
        primaryVisual.transform.localPosition = new Vector3(xPos, zPos, 0);
        mat.SetFloat("_Flip", visuals.Side == BattleSide.Left ? 0 : 1);
    }
Exemplo n.º 3
0
 internal void InsertState(BattalionState state, BattleRound battleRound, int index)
 {
     states[index] = new BattalionStateVisuals(state, battleRound);
 }