Ejemplo n.º 1
0
    public void SaveDeckInfo(string patchID, string gameID, string encounterLevel, string cardColor, string cardName, string energyCost, string manaCost, string chosenFlag, string removedFlag, string finalDeckListFlag)
    {
        if (RoomController.roomController.debug)
        {
            return;
        }

        string filePath = GetCombatPath() + "/deck_data_" + SystemInfo.deviceUniqueIdentifier + ".csv";

        DebugPlus.LogOnScreen(filePath).Duration(5);
        DebugPlus.LogOnScreen(SystemInfo.deviceUniqueIdentifier);
        //Debug.Log(filePath);

        if (!File.Exists(filePath))
        {
            File.WriteAllText(filePath, "deviceID,patchID,gameID,encounterLevel,cardColor,cardName,energyCost,manaCost,chosenFlag,removedFlag,finalDeckListFlag\n");
        }

        string delimiter = ",";
        string line      = SystemInfo.deviceUniqueIdentifier;

        line += delimiter + patchID;
        line += delimiter + gameID;
        line += delimiter + encounterLevel;
        line += delimiter + cardColor;
        line += delimiter + cardName;
        line += delimiter + energyCost;
        line += delimiter + manaCost;
        line += delimiter + chosenFlag;
        line += delimiter + removedFlag;
        line += delimiter + finalDeckListFlag;

        File.AppendAllText(filePath, line + "\n");
    }
Ejemplo n.º 2
0
    public void SaveGoldInfo(string patchID, string gameID, string encounterLevel, string roomName, string passiveGold, string overkillGold, string totalGoldAtRoomEnd)
    {
        if (RoomController.roomController.debug)
        {
            return;
        }

        string filePath = GetCombatPath() + "/gold_data_" + SystemInfo.deviceUniqueIdentifier + ".csv";

        DebugPlus.LogOnScreen(filePath).Duration(5);
        DebugPlus.LogOnScreen(SystemInfo.deviceUniqueIdentifier);
        //Debug.Log(filePath);

        if (!File.Exists(filePath))
        {
            File.WriteAllText(filePath, "deviceID,patchID,gameID,encounterLevel,roomName,passiveGold,overkillGold,totalGoldAtRoomEnd\n");
        }

        string delimiter = ",";
        string line      = SystemInfo.deviceUniqueIdentifier;

        line += delimiter + patchID;
        line += delimiter + gameID;
        line += delimiter + encounterLevel;
        line += delimiter + roomName;
        line += delimiter + passiveGold;
        line += delimiter + overkillGold;
        line += delimiter + totalGoldAtRoomEnd;

        File.AppendAllText(filePath, line + "\n");
    }
Ejemplo n.º 3
0
        void Update()
        {
            pitch -= Input.GetAxis("Mouse Y");
            pitch  = Mathf.Clamp(pitch, -90, 90);
            yaw   += Input.GetAxis("Mouse X");

            Camera.main.transform.rotation = Quaternion.Euler(pitch, yaw, 0);

            bool space = Input.GetKey(KeyCode.Space);

            // some logs on screen
            DebugPlus.LogOnScreen(space ? "space key down !" : "space key up")
            .Color(space ? Color.green : Color.red)
            .Duration(1);
            DebugPlus.LogOnScreen("yaw: " + yaw + " pitch: " + pitch)
            .Color(pitch > 0 ? Color.blue : Color.green);

            // some gizmos
            if (space)
            {
                DebugPlus.DrawWireSphere(new Vector3(0, 1, -2), 0.8f)
                .Color(Color.red)
                .Duration(2);
                DebugPlus.DrawSphere(new Vector3(0, 1, 0), 1)
                .Color(Color.blue)
                .Duration(2);
                DebugPlus.DrawCube(Vector3.zero, new Vector3(1, 2, 1))
                .Color(Color.cyan)
                .Matrix(go.transform.localToWorldMatrix);
            }
        }
Ejemplo n.º 4
0
 public void DebugGrid()
 {
     DebugPlus.LogOnScreen("########").Duration(10);
     for (int y = 0; y < ySize; y++)
     {
         string s = "";
         for (int x = 0; x < xSize; x++)
         {
             s += objects[x, y].Count;
         }
         DebugPlus.LogOnScreen(s).Duration(10);
     }
 }
Ejemplo n.º 5
0
    public void SaveCombatInfo(string patchID, string gameID, string encounterLevel, string roomName, string turnID, string castOrder, string cardColor, string cardName, string heldFlag, string replacedFlag,
                               string unplayedFlag, string castFlag, string casterName, string targetCount, string targetName, string vitDamageDone, string shieldDamageDone, string manaGenerated, string manaUsed)
    {
        if (RoomController.roomController.debug)
        {
            return;
        }

        string filePath = GetCombatPath() + "/combat_data_" + SystemInfo.deviceUniqueIdentifier + ".csv";

        DebugPlus.LogOnScreen(filePath).Duration(5);
        DebugPlus.LogOnScreen(SystemInfo.deviceUniqueIdentifier);
        //Debug.Log(filePath);

        if (!File.Exists(filePath))
        {
            File.WriteAllText(filePath, "deviceID,patchID,gameID,encounterLevel,roomName,turnID,castOrder,cardColor,cardName,heldFlag,replacedFlag,unplayedFlag,castFlag,casterName,targetCount,targetName,vitDamageDone,shieldDamageDone,manaGenerated,manaUsed\n");
        }

        string delimiter = ",";
        string line      = SystemInfo.deviceUniqueIdentifier;

        line += delimiter + patchID;
        line += delimiter + gameID;
        line += delimiter + encounterLevel;
        line += delimiter + roomName;
        line += delimiter + turnID;
        line += delimiter + castOrder;
        line += delimiter + cardColor;
        line += delimiter + cardName;
        line += delimiter + heldFlag;
        line += delimiter + replacedFlag;
        line += delimiter + unplayedFlag;
        line += delimiter + castFlag;
        line += delimiter + casterName;
        line += delimiter + targetCount;
        line += delimiter + targetName;
        line += delimiter + vitDamageDone;
        line += delimiter + shieldDamageDone;
        line += delimiter + manaGenerated;
        line += delimiter + manaUsed;

        File.AppendAllText(filePath, line + "\n");
    }
Ejemplo n.º 6
0
    public Vector2 FindNearestEmptyLocation(Vector2 startingLoc, List <Vector2> occupiedLocations, int size)
    {
        Dictionary <int, Vector2> locations = new Dictionary <int, Vector2>();

        for (int x = -3; x < 3; x++)
        {
            for (int y = -3; y < 3; y++)
            {
                Vector2 newLoc = GetRoundedVector(startingLoc, size) + new Vector2(x, y);
                //Debug.Log(newLoc);
                List <Vector2> newLocs = new List <Vector2>();
                foreach (Vector2 loc in occupiedLocations)
                {
                    newLocs.Add(newLoc + loc);
                }
                if (!CheckIfOutOfBounds(newLocs) && GetObjectAtLocation(newLocs).Count == 0)
                {
                    locations[GetManhattanDistance(startingLoc, newLoc)] = newLoc;
                }
            }
        }
        DebugPlus.LogOnScreen(locations.Keys.ToString()).Duration(10);
        return(locations[locations.Keys.Min()]);
    }
 private void Update()
 {
     DebugPlus.LogOnScreen("OnGround: " + IsGrounded());
     DebugPlus.LogOnScreen("GroundType: " + GetGroundTypeBelow());
     DebugPlus.LogOnScreen("IsOnSlide: " + IsOnSlide());
 }