Ejemplo n.º 1
0
    public void AddPanel(FighterInfo info)
    {
        SelectorPanel panel = panels[count];

        panel.SetPortrait(info);
        count++;
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     bgSprite       = GetComponent <SpriteRenderer>();
     bgSprite.color = Settings.current_settings.player_colors[playerNum];
     portraitSprite = transform.GetChild(0).GetComponent <SpriteRenderer>();
     player         = ReInput.players.GetPlayer(playerNum);
     current_panel  = portraits.GetPanel(new Vector2(0, 0));
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Awake()
 {
     foreach (Transform child in transform)
     {
         SelectorPanel panel = child.GetComponent <SelectorPanel>();
         panels.Add(panel);
         panel.GridLoc.x            = panel.transform.localPosition.x;
         panel.GridLoc.y            = panel.transform.localPosition.y;
         panelsByLoc[panel.GridLoc] = panel;
     }
 }
Ejemplo n.º 4
0
 private void DirectionPressed(Vector2 dir)
 {
     //If the selection is not active, activate it
     if (!active)
     {
         active = true;
     }
     else if (active && !confirmed)
     {
         Vector2       currentPos = current_panel.GridLoc;
         SelectorPanel panel      = portraits.GetPanel(currentPos + dir);
         if (panel.active)
         {
             current_panel.selected[playerNum] = false;
             current_panel = panel;
         }
     }
 }