Ejemplo n.º 1
0
    private CommandSlotController InitializeCommand(int c, short robotId, byte robotPriority)
    {
        CommandSlotController cmd = Instantiate(commandSlot, transform);

        cmd.Initialize(robotId, c + 1, robotPriority);
        cmd.transform.localScale    = new Vector3(1, 1.0f / GameConstants.MAX_PRIORITY, 1);
        cmd.transform.localPosition = new Vector3(0, 1.0f / GameConstants.MAX_PRIORITY * (c + 1.5f) - 0.5f, 0);
        return(cmd);
    }