コード例 #1
0
 public MessageEventArgs(string meldung, string key, object data, eLevel level)
 {
     Meldung = meldung;
     Key     = key;
     Data    = data;
     Level   = level;
 }
コード例 #2
0
    public void SetCoordinate(int x, int y, eLevel level)
    {
        AxialX = x;
        AxialY = y;
        Level  = level;

        this.name = String.Format("{0}, {1}, {2}", AxialX, AxialY, level.ToString());
    }
コード例 #3
0
    private void OnEnable()
    {
        originLevel = Teleport.GetLevelEnum(gameObject.scene.name);
        SceneManager.sceneLoaded += OnSceneLoaded;
        targetSceneName           = Teleport.GetLevelString(nextLevel);

        blk = new Texture2D(1, 1);
    }
コード例 #4
0
    public void add(string message, Vector3 pos, eLevel level)
    {
        GameObject newCombatText;

        pool.TryGetNextObject(pos, Quaternion.identity, out newCombatText);

        float angle = Mathf.Clamp(ejectionAngle + UnityEngine.Random.Range(-spreadAngle * 0.5f, spreadAngle * 0.5f), -180, 180);

        CombatText pooledCombatText = newCombatText.GetComponent <CombatText>();

        pooledCombatText.Init(message, duration, speed, angle);
    }
コード例 #5
0
        public bool TryGetDragon(eLevel eLevel, int lv, out fmDataMonster data)
        {
            data = null;
            //int hitLv = m_random.Next((lv + 1), (lv + 5));
            //hitElement = (eElement)m_random.Next((int)eElement.None, (int)eElement.Nature + 1);

            data = GetMonInDTomb(eLevel);
            if (null == data)
            {
                return(false);
            }

            return(true);
        }
コード例 #6
0
    /// <summary>
    /// move to another scene
    /// </summary>
    /// <param name="levelID"></param>
    public static void TeleportToScene(eLevel levelID)
    {
        if (loadingLevel)
        {
            return;
        }
        loadingLevel = true;
        string nextLoaded = GetLevelString(levelID);

        if (nextLoaded.Length < 1)
        {
            Debug.Log("Teleport to " + levelID + "isn't implemented.");
        }
        StartLoading(nextLoaded);
    }
コード例 #7
0
        public virtual XmlDocument GetXmlDocument(eLevel level)
        {
            //objStatus.Validate();

            // Cria documento Xml
            xml = new XmlDocument();

            // Cria elemento Root
            XmlElement xmlElementRoot = xml.CreateElement("Status");

            xmlElementRoot.SetAttribute("company", Company);
            xmlElementRoot.SetAttribute("product", objStatus.SistemaNome);
            xmlElementRoot.SetAttribute("version", objStatus.SistemaVersao);
            xml.AppendChild(xmlElementRoot);

            // Cria declaração do documento
            XmlDeclaration xmlDeclaration = xml.CreateXmlDeclaration("1.0", "utf-8", null);

            xml.InsertBefore(xmlDeclaration, xmlElementRoot);

            switch (level)
            {
            case eLevel.level1:
            case eLevel.level2:
                xmlElementRoot.AppendChild(GetElementIdentity(false));
                break;

            case eLevel.level3:
            {
                // Verifica autenticação do usuário
                if (objStatus.UsuarioIsAuthorized)
                {
                    xmlElementRoot.AppendChild(GetElementFolder());
                    xmlElementRoot.AppendChild(GetElementIdentity(true));
                }
                break;
            }
            }
            if (!String.IsNullOrEmpty(objStatus.EmailTo))
            {
                xmlElementRoot.AppendChild(GetElementEmail(objStatus.EmailTo));
            }

            return(xml);
        }
コード例 #8
0
    public static HexTile CreateTile(Transform map, int x, int y, eLevel level)
    {
        float      offsetX     = (HexTile.ModelWidth * 0.75f) * x;
        float      offsetY     = (HexTile.ModelHeigth * y) - (HexTile.ModelHeigth - ((HexTile.ModelHeigth / 2.0f) * x)) + HexTile.ModelHeigth;
        float      offsetLevel = HexTile.ModelThickness * (int)level;
        GameObject prefabHex   = HexTile.GetPrefab();

        Quaternion rotation = level == eLevel.Up ? Quaternion.identity : Quaternion.AngleAxis(180.0f, Vector3.right);
        GameObject g        = (GameObject)Instantiate(prefabHex, new Vector3(offsetX, offsetLevel, offsetY), rotation);

        g.transform.parent = map;
        HexTile h = g.GetComponent <HexTile>();

        h.InitHexTile();
        h.SetCoordinate(x, y, level);

        return(h);
    }
コード例 #9
0
        //public int GetGoblinInMaze(out fmDataMonster data)
        //{
        //    data = null;
        //    int dropKind = 0;
        //    int monCode = 0;

        //    if (true == m_mazeGoblin.Gocha(out dropKind, out monCode))
        //    {
        //        if (true == m_dicMonster.ContainsKey(monCode))
        //        {
        //            data = m_dicMonster[monCode];
        //        }
        //    }

        //    return dropKind;
        //}

        //public int GetGoblinInExplore(Random lordRandom, int maxRound, out fmDataMonster data, out int intoRound)
        //{
        //    data = null;
        //    intoRound = 0;

        //    int dropKind = 0;
        //    int monCode = 0;

        //    if (null == lordRandom)
        //        return 0;

        //    intoRound = lordRandom.Next(1, maxRound);

        //    Logger.Debug("GetGoblinInExplore intoRound: {0}", intoRound);
        //    if (true == m_exploreGoblin.Gocha(out dropKind, out monCode))
        //    {
        //        //Console.WriteLine("monCode: "+ monCode);
        //        if (true == m_dicMonster.ContainsKey(monCode))
        //        {
        //            data = m_dicMonster[monCode];
        //            //if (null == data)
        //            //{
        //            //    Console.WriteLine("data: null");
        //            //}
        //        }
        //    }

        //    return dropKind;
        //}

        private fmDataMonster GetMonInDTomb(eLevel eLevel)
        {
            if (false == m_gochaTomb.ContainsKey(eLevel))
            {
                return(null);
            }

            fmGochaTombMonster gm = m_gochaTomb[eLevel];

            int monCode = gm.Gocha();

            if (false == m_dicMonster.ContainsKey(monCode))
            {
                return(null);
            }


            return(m_dicMonster[monCode]);
        }
コード例 #10
0
    public static Coordinate[] RingInRadiusCoordinates(int baseX, int baseY, eLevel level, int radius)
    {
        List <Coordinate> result = new List <Coordinate>();

        if (radius > 0)
        {
            int maxX = baseX + radius, minX = baseX - radius,
                maxY = baseY + radius, minY = baseY - radius;

            for (int i = minY; i <= baseY; i++)
            {
                result.Add(new Coordinate(maxX, i, level));
            }
            for (int i = baseY; i <= maxY; i++)
            {
                result.Add(new Coordinate(minX, i, level));
            }
            for (int i = minX + 1; i <= baseX; i++)
            {
                result.Add(new Coordinate(i, maxY, level));
            }
            for (int i = baseX; i < maxX; i++)
            {
                result.Add(new Coordinate(i, minY, level));
            }
            for (int i = 1; i <= radius; i++)
            {
                result.Add(new Coordinate(baseX - i, minY + i, level));
                result.Add(new Coordinate(maxX - i, baseY + i, level));
            }
        }
        else if (radius == 0)
        {
            result.Add(new Coordinate(baseX, baseY, level));
        }

        return(result.ToArray());
    }
コード例 #11
0
    private void Positioning(Transform target)
    {
        if (TriggerSceneChange.instance)
        {
            eLevel origin = TriggerSceneChange.instance.originLevel;

            for (int i = 0; i < sceneSpecificSpawnPoints.Length; i++)
            {
                if (sceneSpecificSpawnPoints[i].otherLevel == origin)
                {
                    Transform nextTransform = sceneSpecificSpawnPoints[i].EntryPlayerPosition;
                    target.position = nextTransform.position;
                    target.rotation = nextTransform.rotation;

                    Cameras cam = Camera.main.GetComponent <Cameras>();
                    nextTransform = sceneSpecificSpawnPoints[i].EntryCameraRotation;
                    if (nextTransform != null)
                    {
                        cam.transform.rotation = nextTransform.rotation;
                    }
                    else
                    {
                        Vector3 targetRotation = target.eulerAngles;
                        targetRotation.y += 180; // rotated character...

                        if (cam.transform.parent)
                        {
                            cam.transform.parent.eulerAngles = targetRotation;
                        }
                    }

                    return;
                }
            }
        }
        target.position = this.transform.position;
        target.rotation = this.transform.rotation;
    }
コード例 #12
0
    public static string GetLevelString(eLevel levelID)
    {
        string nextLoaded = "";

        switch (levelID)
        {
        case eLevel.altarLevel:
            nextLoaded = StringCollection.LEVEL_altarLevel;
            break;

        case eLevel.finalScene:
            nextLoaded = StringCollection.LEVEL_finalScene;
            break;

        case eLevel.mainMenue:
            nextLoaded = StringCollection.LEVEL_mainMenue;
            break;

        case eLevel.soundBridge:
            nextLoaded = StringCollection.LEVEL_soundBridge;
            break;

        case eLevel.trackingSwamp:
            nextLoaded = StringCollection.LEVEL_trackingSwamp;
            break;

        case eLevel.underTheTree:
            nextLoaded = StringCollection.LEVEL_underTheTree;
            break;

        default:
            Debug.Log("Doesn't know " + levelID + " yet.");
            break;
        }
        return(nextLoaded);
    }
コード例 #13
0
 public Coordinate(int x, int y, eLevel l)
 {
     coordinateX = x;
     coordinateY = y;
     level       = l;
 }
コード例 #14
0
        public void RaiseMessage(eLevel level, string s, string key)
        {
            var meld = new MessageEventArgs(s, key, null, level);

            OnRaiseMessage(meld);
        }
コード例 #15
0
        public void RaiseMessage(eLevel level, string s, string key, object data)
        {
            var meld = new MessageEventArgs(s, key, data, level);

            OnRaiseMessage(meld);
        }