Ejemplo n.º 1
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.MufflingBox)bregion;

        setBaseRegion(region);
        UnkT00 = region.UnkT00;
    }
Ejemplo n.º 2
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.InvasionPoint)bregion;

        setBaseRegion(region);
        Priority = region.Priority;
    }
Ejemplo n.º 3
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.SpawnPoint)bregion;

        setBaseRegion(region);
        UnkT00 = region.UnkT00;
    }
Ejemplo n.º 4
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.EnvironmentMapPoint)bregion;

        setBaseRegion(region);
        UnkFlags = region.UnkFlags;
    }
Ejemplo n.º 5
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.WindSFX)bregion;

        setBaseRegion(region);
        FFXID        = region.FFXID;
        WindAreaName = region.WindAreaName;
    }
Ejemplo n.º 6
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.SFX)bregion;

        setBaseRegion(region);
        FFXID         = region.FFXID;
        StartDisabled = region.StartDisabled;
    }
Ejemplo n.º 7
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.Sound)bregion;

        setBaseRegion(region);
        SoundType        = region.SoundType;
        SoundID          = region.SoundID;
        ChildRegionNames = region.ChildRegionNames;
    }
Ejemplo n.º 8
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.Message)bregion;

        setBaseRegion(region);
        MessageID = region.MessageID;
        UnkT02    = region.UnkT02;
        Hidden    = region.Hidden;
    }
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.EnvironmentMapEffectBox)bregion;

        setBaseRegion(region);
        UnkT00  = region.UnkT00;
        Compare = region.Compare;
        UnkT08  = region.UnkT08;
        UnkT09  = region.UnkT09;
        UnkT0A  = region.UnkT0A;
    }
Ejemplo n.º 10
0
    internal void _Serialize(MSB3.Region region, GameObject parent)
    {
        region.Name = parent.name;

        region.Position.X = parent.transform.position.x;
        region.Position.Y = parent.transform.position.y;
        region.Position.Z = parent.transform.position.z;
        //region.Rotation.X = parent.transform.eulerAngles.x;
        //region.Rotation.Y = parent.transform.eulerAngles.y;
        //region.Rotation.Z = parent.transform.eulerAngles.z;
        //region.Rotation = ConvertEuler(parent.transform.rotation.eulerAngles);
        //region.Rotation = new System.Numerics.Vector3(Rotation.x, Rotation.y, Rotation.z);
        region.Rotation = EulerUtils.quaternion2EulerDeg(parent.transform.rotation.normalized, EulerUtils.RotSeq.yzx);

        region.HasTypeData        = HasTypeData;
        region.Unk2               = Unk2;
        region.UnkA               = UnkA;
        region.UnkB               = UnkB;
        region.MapStudioLayer     = MapStudioLayer;
        region.ActivationPartName = (ActivationPartName == "") ? null : ActivationPartName;
        region.EventEntityID      = EventEntityID;

        if (parent.GetComponent <SphereCollider>() != null)
        {
            var col = parent.GetComponent <SphereCollider>();
            if (IsPoint)
            {
                region.Shape = new MSB3.Shape.Point();
            }
            else
            {
                region.Shape = new MSB3.Shape.Sphere(col.radius);
            }
        }
        else if (parent.GetComponent <BoxCollider>() != null)
        {
            var col = parent.GetComponent <BoxCollider>();
            region.Shape = new MSB3.Shape.Box(col.size.x, col.size.z, col.size.y);
        }
        else if (parent.GetComponent <CapsuleCollider>() != null)
        {
            var col = parent.GetComponent <CapsuleCollider>();
            region.Shape = new MSB3.Shape.Cylinder(col.radius, col.height);
        }
        else
        {
            throw new Exception($@"Region {parent.name} has no shape. Attach a spherical, box, or capsule collider.");
        }
    }
Ejemplo n.º 11
0
    public void setBaseRegion(MSB3.Region region)
    {
        HasTypeData        = region.HasTypeData;
        ID                 = region.ID;
        Unk2               = region.Unk2;
        Unk3               = region.Unk3;
        Unk4               = region.Unk4;
        MapStudioLayer     = region.MapStudioLayer;
        ActivationPartName = region.ActivationPartName;
        EventEntityID      = region.EventEntityID;

        if (region.Shape is MSB3.Shape.Point)
        {
            IsPoint = true;
        }
    }
Ejemplo n.º 12
0
    public void setBaseRegion(MSB3.Region region)
    {
        Rotation = new UnityEngine.Vector3(region.Rotation.X, region.Rotation.Y, region.Rotation.Z);

        HasTypeData        = region.HasTypeData;
        Unk2               = region.Unk2;
        UnkA               = region.UnkA;
        UnkB               = region.UnkB;
        MapStudioLayer     = region.MapStudioLayer;
        ActivationPartName = region.ActivationPartName;
        EventEntityID      = region.EventEntityID;

        if (region.Shape is MSB3.Shape.Point)
        {
            IsPoint = true;
        }
    }
Ejemplo n.º 13
0
 public override void SetRegion(MSB3.Region region)
 {
     setBaseRegion(region);
 }
Ejemplo n.º 14
0
 public abstract void SetRegion(MSB3.Region region);
Ejemplo n.º 15
0
    public override void SetRegion(MSB3.Region bregion)
    {
        var region = (MSB3.Region.MufflingPortal)bregion;

        setBaseRegion(region);
    }