Exemplo n.º 1
0
    public WarshipL CreateWarship(GirlData data, WarshipL.CreateCallback callback)
    {
        WarshipL ws = GetWarship(data.roleCardId);

        if (ws != null)
        {
            return(ws);
        }

        ws = new WarshipL(data);
        ws.Initialize(delegate(WarshipL ws1)
        {
            _mWarshipList.Add(ws);
            if (null != callback)
            {
                callback(ws);
            }
        });


        // LocateFleetPosition();
        // CalculateFleetRect();

        return(ws);
    }
Exemplo n.º 2
0
    public MonsterWarship CreateMonsterWarship(CopyMonsterData.MonsterData data, WarshipL.CreateCallback callback)
    {
        MonsterWarship monster = new MonsterWarship(data);

        monster.Initialize(delegate(WarshipL ws)
        {
            _monsterWarshipList.Add(monster);
            if (null != callback)
            {
                callback(ws);
            }
        });

        return(monster);
    }
Exemplo n.º 3
0
    public void Initialize(WarshipL.CreateCallback callback)
    {
        base.Initialize(delegate(WarshipL ws)
        {
            base._mMoveSpeed = 40.0f;

            // Set the monster fleet orientation
            Quaternion rotation = Quaternion.AngleAxis(180, Vector3.up);
            base.U3DGameObject.transform.rotation = rotation;

            Show3DName(true);

            _mVisibleTrigger = null;
            InitTriggers();
            InitAIScripts();

            TagMaskDefine.SetTagRecuisively(U3DGameObject, TagMaskDefine.GFAN_MONSTER);
            if (null != callback)
            {
                callback(this);
            }
        }
                        );
    }