Ejemplo n.º 1
0
 public static bool IsHeavy(this ActorType type)
 {
     if (ActorTypeExtensions.IsPickable(type))
     {
         return(!ActorTypeExtensions.IsLight(type));
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 2
0
        public CollisionType GetRotatedFace(FaceOrientation face)
        {
            FaceOrientation index         = FezMath.OrientationFromPhi(FezMath.ToPhi(face) - this.Phi);
            CollisionType   collisionType = this.Trile.Faces[index];

            if (collisionType == CollisionType.TopOnly)
            {
                TrileEmplacement emplacement = this.Emplacement;
                ++emplacement.Y;
                Vector3       mask = FezMath.GetMask(FezMath.AsAxis(face));
                TrileInstance trileInstance;
                if (TrileInstance.LevelManager.Triles.TryGetValue(emplacement, out trileInstance) && trileInstance.Enabled && !trileInstance.IsMovingGroup && (trileInstance.Trile.Geometry == null || !trileInstance.Trile.Geometry.Empty || trileInstance.Trile.Faces[index] != CollisionType.None) && (!trileInstance.Trile.Immaterial && trileInstance.Trile.Faces[index] != CollisionType.Immaterial && (!trileInstance.Trile.Thin && !ActorTypeExtensions.IsPickable(trileInstance.Trile.ActorSettings.Type)) && (((double)trileInstance.Trile.Size.Y == 1.0 || trileInstance.ForceTopMaybe) && FezMath.AlmostEqual(FezMath.Dot(trileInstance.Center, mask), FezMath.Dot(this.Center, mask)))))
                {
                    collisionType = CollisionType.None;
                }
            }
            return(collisionType);
        }