public Spring()
 {
     var mesh = Game.Current.GetMesh("Spring");
     Add(new MeshStaticPart(mesh));
     Add(_Top = new MeshTranslatedScaledPart(Game.Current.NewMesh("WallRounded"), _CoverTranslation, _CoverScaleFactor) { Color = Color.FromArgb(123, 123, 123) });
     Add(_Bottom = new MeshTranslatedScaledPart(Game.Current.NewMesh("WallRounded"), -_CoverTranslation, _CoverScaleFactor) { Color = Color.FromArgb(0, 0, 0) });
     Add(_Collider = new ObbTranslatedCollider(mesh));
 }
Exemple #2
0
        public Spring()
        {
            var mesh = Game.Current.GetMesh("Spring");

            Add(new MeshStaticPart(mesh));
            Add(_Top = new MeshTranslatedScaledPart(Game.Current.NewMesh("WallRounded"), _CoverTranslation, _CoverScaleFactor)
            {
                Color = Color.FromArgb(123, 123, 123)
            });
            Add(_Bottom = new MeshTranslatedScaledPart(Game.Current.NewMesh("WallRounded"), -_CoverTranslation, _CoverScaleFactor)
            {
                Color = Color.FromArgb(0, 0, 0)
            });
            Add(_Collider = new ObbTranslatedCollider(mesh));
        }