Пример #1
0
    // --------------------------------------------------------------------------------------------//

    // AI 를 보고싶다



    bool NetworkObjectCheck()
    {
        if (!string.IsNullOrEmpty(NetworkOrderController.ORDER_NAME))
        {
            m_name = NetworkOrderController.ORDER_NAME + "_boss_" + this.GetHashCode();


            if (GameManager.Instance().CUR_PLACE == GameManager.ROBO_PLACE.BOSS_AREA)
            {
                if (!NetworkOrderController.ORDER_NAME.Equals(GameManager.Instance().PLAYER.USER_NAME))
                {
                    this.enabled = false;

                    this.gameObject.AddComponent <NetworkMoving>().NAME          = m_name;
                    this.gameObject.AddComponent <NetworkStage1BOSS>().BOSS_NAME = m_name;
                }
                else
                {
                    m_pattern = new PatternA(m_skeletonAnimation, ANI_AB_MOVE, ANI_ATTACK_A, m_name);
                }
                return(true);
            }
        }
        return(false);
    }
Пример #2
0
        public void PartialPrint_Manage_EmptyGuid()
        {
            var date    = new DateTime(2009, 1, 1, 3, 4, 5);
            var pattern = new PatternA(date, 12000, Guid.Empty, 120);

            Assert.IsTrue(!pattern.ToString().EndsWith(120.ToString()));
        }
Пример #3
0
    void Start()
    {
        // 처음 패턴은 A다.
        m_hp = 100;
        m_skeletonAnimation = this.GetComponent <SkeletonAnimation>();
        m_pattern           = new PatternA(m_skeletonAnimation, ANI_AB_MOVE, ANI_ATTACK_A, m_name);

        NetworkManager.Instance().AddNetworkOrderMessageEventListener(this);
        this.transform.GetChild(3).GetComponent <TextMesh>().text = "BOSS hp : " + m_hp + "/100";
    }
Пример #4
0
        public void Two_Patterns()
        {
            // actually ensures that the implementation supports two patterns

            var date = new DateTime(2009, 1, 1, 3, 4, 5);
            var pa   = new PatternA(date, 12000, Guid.NewGuid(), 120);
            var pb   = new PatternB(Guid.NewGuid(), 1000);

            Assert.AreNotEqual(pa.ToString(), pb.ToString());
        }
Пример #5
0
    // 패턴 A 체크용
    bool PatternA_AbleCheck()
    {
        m_patternATick += Time.deltaTime;

        if (m_patternATick >= GameSetting.BOSS1_PATTERN_A_ABLE_COOLTIME)
        {
            return(false);
        }

        // 이 시간 동안에는 패턴 A로 공격한다
        if (!(m_pattern is PatternA))
        {
            m_pattern = new PatternA(m_skeletonAnimation, ANI_AB_MOVE, ANI_ATTACK_A, m_name);
        }

        return(true);
    }
Пример #6
0
        public void Conversion_round_trip()
        {
            var date     = new DateTime(2009, 1, 1, 3, 4, 5);
            var original = new PatternA(date, 12000, Guid.NewGuid(), 120);

            var name = UntypedBlobName.Print(original);

            //Console.WriteLine(name);

            var parsed = UntypedBlobName.Parse <PatternA>(name);

            Assert.AreNotSame(original, parsed);
            Assert.AreEqual(original.Timestamp, parsed.Timestamp);
            Assert.AreEqual(original.AccountHRID, parsed.AccountHRID);
            Assert.AreEqual(original.ChunkID, parsed.ChunkID);
            Assert.AreEqual(original.ChunkSize, parsed.ChunkSize);
        }
Пример #7
0
    void Start()
    {
        GoVoxel       = _goVoxel;
        MatBlock      = _matBlock;
        MatConnection = _matConnection;
        GoTarget      = _goTarget;
        Size          = _size;
        VoxelSize     = _voxelSize;
        MinCon        = _minCon;

        Grid = new Grid3D(Size);

        var pattern = new PatternA();

        //startBlock = new Block(pattern, new Vector3Int(Size.x / 2, 1, Size.y / 2), new Vector3Int(0, 180, 0), _grid);

        //_grid.AddBlockToGrid(startBlock);
        Grid.IniPathFindingStrucutralAnalysis();

        //StartCoroutine(NextBlockOverTime()); //To generate blocks over time
    }
Пример #8
0
        public void PartialPrint_Manage_DefaultTimeValue()
        {
            var pattern = new PatternA();

            Assert.AreEqual(string.Empty, pattern.ToString());
        }