示例#1
0
    protected void DecomposeFashion()
    {
        this.FashionModelID  = 0;
        this.FashionEquipIDs = null;
        this.FashionWingID   = 0;
        for (int i = 0; i < this.fashionIDs.get_Count(); i++)
        {
            FashionModelType fashionModelType = FashionModelType.None;
            int fashionModelTypeID            = ExteriorArithmeticUnit.GetFashionModelTypeID(this.fashionIDs.get_Item(i), out fashionModelType);
            if (fashionModelTypeID != 0)
            {
                switch (fashionModelType)
                {
                case FashionModelType.Equip:
                    this.FashionEquipIDs.Add(fashionModelTypeID);
                    break;

                case FashionModelType.Wing:
                    this.FashionWingID = fashionModelTypeID;
                    break;

                case FashionModelType.Model:
                    this.FashionModelID = fashionModelTypeID;
                    break;
                }
            }
        }
    }
示例#2
0
 public void Clone(ExteriorArithmeticUnit origin, bool isArithmetic = true)
 {
     this.Reset();
     this.finalModelID     = origin.FinalModelID;
     this.finalWeaponID    = origin.FinalWeaponID;
     this.finalWeaponGogok = origin.FinalWeaponGogok;
     this.finalClothesID   = origin.FinalClothesID;
     this.finalWingID      = origin.FinalWingID;
     this.standardModelID  = origin.StandardModelID;
     this.equipIDs.Clear();
     this.equipIDs.AddRange(origin.EquipIDs);
     this.gogok         = origin.Gogok;
     this.wingID        = origin.WingID;
     this.isHideWing    = origin.IsHideWing;
     this.clientModelID = origin.ClientModelID;
     this.serverModelID = origin.ServerModelID;
     this.fashionIDs.Clear();
     this.fashionIDs.AddRange(origin.FashionIDs);
     this.fashionModelID = origin.FashionModelID;
     this.fashionEquipIDs.Clear();
     this.fashionEquipIDs.AddRange(origin.FashionEquipIDs);
     this.fashionWingID = origin.FashionWingID;
     if (isArithmetic)
     {
         this.Arithmetic();
     }
 }
示例#3
0
    protected ActorModel GetModel(int index, ExteriorArithmeticUnit exteriorUnit)
    {
        ActorModel actorModel = ModelPool.Instance.Get(exteriorUnit.FinalModelID);

        actorModel.ModelType  = ActorModelType.UI;
        actorModel.ModelLayer = "NPC";
        actorModel.set_name(index.ToString());
        actorModel.get_transform().set_position(new Vector3((float)(-1000 * (index + 1)), 1000f, 0f));
        actorModel.EquipOn(exteriorUnit.FinalWeaponID, exteriorUnit.FinalWeaponGogok);
        actorModel.EquipOn(exteriorUnit.FinalClothesID, 0);
        actorModel.EquipWingOn(exteriorUnit.FinalWingID);
        LayerSystem.SetGameObjectLayer(actorModel.get_gameObject(), "NPC", 1);
        actorModel.PreciseSetAction("idle_city");
        return(actorModel);
    }
示例#4
0
    public List <GameObject> SetModelData(RawImage rawImage, ExteriorArithmeticUnit exteriorUnit, out int index)
    {
        List <GameObject> list = new List <GameObject>();

        index = this.BorrowModelIndex();
        RenderTexture renderTexture = null;

        RTManager.CreateRenderTexture(ref renderTexture, "temp_render_texture");
        rawImage.GetComponent <RectTransform>().set_sizeDelta(new Vector2((float)renderTexture.get_width(), (float)renderTexture.get_height()));
        RTManager.SetRT(rawImage, renderTexture);
        Camera camera = this.CreateModelCamera(renderTexture);

        list.Add(camera.get_gameObject());
        ActorModel model = this.GetModel(index, exteriorUnit);

        list.Add(model.get_gameObject());
        camera.get_transform().set_rotation(model.get_transform().get_rotation() * Quaternion.AngleAxis(180f, Vector3.get_up()));
        Vector3 vector  = model.get_transform().get_up() * 0.9f;
        Vector3 vector2 = model.get_transform().get_forward() * 2.95f;

        camera.get_transform().set_position(model.get_transform().get_position() + vector + vector2);
        return(list);
    }
示例#5
0
    protected void Arithmetic()
    {
        bool flag  = false;
        int  num   = 0;
        bool flag2 = false;
        int  num2  = 0;

        this.FinalModelID     = this.StandardModelID;
        this.FinalWeaponID    = 0;
        this.FinalWeaponGogok = 0;
        this.FinalClothesID   = 0;
        this.FinalWingID      = this.WingID;
        ExteriorArithmeticUnit.AnalysisEquipList(this.EquipIDs, out flag, out num, out flag2, out num2);
        if (flag)
        {
            this.FinalWeaponID    = num;
            this.FinalWeaponGogok = this.Gogok;
        }
        if (flag2)
        {
            this.FinalModelID   = this.StandardModelID;
            this.FinalClothesID = num2;
        }
        if (this.ServerModelID != 0)
        {
            this.FinalModelID   = this.ServerModelID;
            this.FinalClothesID = 0;
        }
        if (this.FashionWingID != 0)
        {
            this.FinalWingID = this.FashionWingID;
        }
        ExteriorArithmeticUnit.AnalysisEquipList(this.FashionEquipIDs, out flag, out num, out flag2, out num2);
        if (flag)
        {
            this.FinalWeaponID    = num;
            this.FinalWeaponGogok = 0;
        }
        if (flag2)
        {
            this.FinalModelID   = this.StandardModelID;
            this.FinalClothesID = num2;
        }
        if (this.FashionModelID != 0)
        {
            this.FinalModelID   = this.FashionModelID;
            this.FinalClothesID = 0;
        }
        if (this.ClientModelID != 0)
        {
            this.FinalModelID     = this.ClientModelID;
            this.FinalWeaponID    = 0;
            this.FinalWeaponGogok = 0;
            this.FinalClothesID   = 0;
            this.FinalWingID      = 0;
        }
        if (this.IsHideWing)
        {
            this.FinalWingID = 0;
        }
        this.AutoUpdateExterior();
    }