Example #1
0
    // 0 = No event, 1 = Entrance, 2 = Exit, 3 = Enemy, 4 = Trap, 5 = Event, 6 = Box
    private void OccurEnemy(ref FieldEventType eventFlag, ref Transform eventObject)
    {
        Debug.Log("Enemy");
        Vector2 eventCoordination = new Vector2(currentX, currentY);

        PlayerPrefsX.SetVector2(PlayerPrefs.GetString(eventCoordination.ToString()), new Vector2(-1, -1));
        //Debug.Log(PlayerPrefs.GetString(eventCoordination.ToString()));
        //Debug.Log(fieldEventContainer[currentX, currentY].name);
        DestroyImmediate(eventObject.gameObject);
        eventFlag = FieldEventType.Nothing;
        //Debug.Log("St X : " + PlayerPrefs.GetInt(PrefsEntity.StartX) + " St Y : " + PlayerPrefs.GetInt(PrefsEntity.StartY));
        LoadingManager.LoadSceneFieldToBattle();
    }