예제 #1
0
    public MSB3.Part.Enemy Serialize(GameObject parent)
    {
        var part = new MSB3.Part.Enemy(ID, parent.name);

        _Serialize(part, parent);
        part.CollisionName = (CollisionName == "") ? null : CollisionName;
        part.ThinkParamID  = ThinkParamID;
        part.NPCParamID    = NPCParamID;
        part.TalkID        = TalkID;
        part.CharaInitID   = CharaInitID;
        part.UnkT04        = UnkT04;
        part.ChrManipulatorAllocationParameter = ChrManipulatorAllocationParameter;
        part.UnkT20            = UnkT20;
        part.BackupEventAnimID = BackupEventAnimID;
        part.UnkT78            = UnkT78;
        part.UnkT84            = UnkT84;
        part.UnkT8C            = UnkT8C;
        part.UnkT94            = UnkT94;
        part.UnkT9C            = UnkT9C;
        part.UnkTA4            = UnkTA4;
        part.UnkTAC            = UnkTAC;
        part.UnkTC0            = UnkTC0;
        part.UnkTC4            = UnkTC4;
        part.UnkTC8            = UnkTC8;
        part.UnkTCC            = UnkTCC;
        return(part);
    }
예제 #2
0
        private void CellValueChangedHandler(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex < 0)
            {
                return;
            }

            DataGridViewColumn column = dataGridView.Columns[e.ColumnIndex];
            DataGridViewRow    row    = dataGridView.Rows[e.RowIndex];
            DataGridViewCell   cell   = row.Cells[e.ColumnIndex];

            MSB3.Part.Enemy enemy = enemies[e.RowIndex];

            switch (column.Name)
            {
            case "Name":
                enemy.Name = (string)cell.Value;
                break;

            case "ModelName":
                enemy.ModelName = (string)cell.Value;
                row.Cells["Description"].Value = ChrIDs.f(enemy.ModelName);
                AddEnemyModel(enemy.ModelName);
                break;

            case "ThinkParamID":
                enemy.ThinkParamID = (int)cell.Value;
                break;

            case "NPCParamID":
                enemy.NPCParamID = (int)cell.Value;
                break;

            case "EventEntityID":
                enemy.EntityID = (int)cell.Value;
                break;

            case "TalkID":
                enemy.TalkID = (int)cell.Value;
                break;

            case "CharaInitID":
                enemy.CharaInitID = (int)cell.Value;
                break;

            case "Position":
                enemy.Position = ParseVector3((string)cell.Value);
                break;

            case "Rotation":
                enemy.Rotation = ParseVector3((string)cell.Value);
                break;

            case "Description":
                break;

            default:
                throw new Exception("CellValueChangedHandler missing code path");
            }
        }
예제 #3
0
 public EnemyWrapper(EnemyWrapper clone)
 {
     if (clone._ds3Enemy != null)
     {
         _ds3Enemy = new MSB3.Part.Enemy(clone._ds3Enemy);
     }
     else if (clone._sekiroEnemy != null)
     {
         _sekiroEnemy = new MSBS.Part.Enemy(clone._sekiroEnemy);
     }
 }
예제 #4
0
        private void UpdateRow(int index)
        {
            MSB3.Part.Enemy enemy = enemies[index];
            DataGridViewRow row   = dataGridView.Rows[index];

            row.Cells["Name"].Value          = enemy.Name;
            row.Cells["ModelName"].Value     = enemy.ModelName;
            row.Cells["ThinkParamID"].Value  = enemy.ThinkParamID;
            row.Cells["NPCParamID"].Value    = enemy.NPCParamID;
            row.Cells["EventEntityID"].Value = enemy.EntityID;
            row.Cells["TalkID"].Value        = enemy.TalkID;
            row.Cells["CharaInitID"].Value   = enemy.CharaInitID;
            row.Cells["Position"].Value      = enemy.Position.ToString();
            row.Cells["Rotation"].Value      = enemy.Rotation.ToString();
            row.Cells["Description"].Value   = ChrIDs.f(enemy.ModelName);
        }
예제 #5
0
 public void SetPart(MSB3.Part.Enemy part)
 {
     setBasePart(part);
     GParamConfig = gameObject.AddComponent <MSB3GParamConfig>();
     GParamConfig.setStruct(part.Gparam);
     CollisionName = part.CollisionName;
     ThinkParamID  = part.ThinkParamID;
     NPCParamID    = part.NPCParamID;
     TalkID        = part.TalkID;
     CharaInitID   = part.CharaInitID;
     UnkT04        = part.UnkT04;
     ChrManipulatorAllocationParameter = part.ChrManipulatorAllocationParameter;
     WalkRouteName     = part.WalkRouteName;
     BackupEventAnimID = part.BackupEventAnimID;
     UnkT78            = part.UnkT78;
     UnkT84            = part.UnkT84;
 }
예제 #6
0
    public MSB3.Part.Enemy Serialize(GameObject parent)
    {
        var part = new MSB3.Part.Enemy(parent.name);

        _Serialize(part, parent);
        part.Gparam        = GParamConfig.Serialize();
        part.CollisionName = (CollisionName == "") ? null : CollisionName;
        part.ThinkParamID  = ThinkParamID;
        part.NPCParamID    = NPCParamID;
        part.TalkID        = TalkID;
        part.CharaInitID   = CharaInitID;
        part.UnkT04        = UnkT04;
        part.ChrManipulatorAllocationParameter = ChrManipulatorAllocationParameter;
        part.WalkRouteName     = (WalkRouteName == "") ? null : WalkRouteName;
        part.BackupEventAnimID = BackupEventAnimID;
        part.UnkT78            = UnkT78;
        part.UnkT84            = UnkT84;
        return(part);
    }
예제 #7
0
        static void Main(string[] args)
        {
            var msb = MSB3.Read(args[0]);
            var chr = new MSB3.Part.Enemy();

            chr.Name              = "c1280_0000";
            chr.ModelName         = "c0000";
            chr.MapStudioLayer    = 0xFFFFFFFF;
            chr.ThinkParamID      = 128010;
            chr.NPCParamID        = 128010;
            chr.CharaInitID       = -1;
            chr.BackupEventAnimID = -1;
            chr.EntityID          = -1;
            chr.LodParamID        = -1;
            chr.UnkE0E            = -1;

            msb.Parts.Enemies.Add(chr);

            msb.Write(args[0]);
        }
예제 #8
0
 public void SetPart(MSB3.Part.Enemy part)
 {
     setBasePart(part);
     CollisionName = part.CollisionName;
     ThinkParamID  = part.ThinkParamID;
     NPCParamID    = part.NPCParamID;
     TalkID        = part.TalkID;
     CharaInitID   = part.CharaInitID;
     UnkT04        = part.UnkT04;
     ChrManipulatorAllocationParameter = part.ChrManipulatorAllocationParameter;
     UnkT20            = part.UnkT20;
     BackupEventAnimID = part.BackupEventAnimID;
     UnkT78            = part.UnkT78;
     UnkT84            = part.UnkT84;
     UnkT8C            = part.UnkT8C;
     UnkT94            = part.UnkT94;
     UnkT9C            = part.UnkT9C;
     UnkTA4            = part.UnkTA4;
     UnkTAC            = part.UnkTAC;
     UnkTC0            = part.UnkTC0;
     UnkTC4            = part.UnkTC4;
     UnkTC8            = part.UnkTC8;
     UnkTCC            = part.UnkTCC;
 }
예제 #9
0
 public EnemyWrapper(MSB3.Part.Enemy enemy)
 {
     _ds3Enemy = enemy;
 }