public override void onEntityTransformChanged( Transform.Component comp ) { base.onEntityTransformChanged( comp ); // our sprite is disabled so we need to forward the call over to it so it can update its bounds for rendering _sprite.onEntityTransformChanged( comp ); }
public override void onEntityTransformChanged( Transform.Component comp ) { forceMatrixUpdate(); }
public InspectorList( Transform transform ) { name = "Transform"; _inspectors = Inspector.getTransformProperties( transform ); }
/// <summary> /// sets the parent Transform of this Transform /// </summary> /// <returns>The parent.</returns> /// <param name="parent">Parent.</param> public Transform setParent( Transform parent ) { if( _parent == parent ) return this; if( _parent != null ) _parent._children.Remove( this ); if( parent != null ) parent._children.Add( this ); _parent = parent; setDirty( DirtyType.PositionDirty ); return this; }
public void copyFrom( Transform transform ) { _position = transform.position; _localPosition = transform._localPosition; _rotation = transform._rotation; _localRotation = transform._localRotation; _scale = transform._scale; _localScale = transform._localScale; // hierarchyDirty |= DirtyType.PositionDirty; // hierarchyDirty |= DirtyType.RotationDirty; // hierarchyDirty |= DirtyType.ScaleDirty; setDirty( DirtyType.PositionDirty ); setDirty( DirtyType.RotationDirty ); setDirty( DirtyType.ScaleDirty ); }
public override void onEntityTransformChanged( Transform.Component comp ) { // set the appropriate dirty flags switch( comp ) { case Transform.Component.Position: _isPositionDirty = true; break; case Transform.Component.Scale: _isPositionDirty = true; break; case Transform.Component.Rotation: _isRotationDirty = true; break; } if( _isColliderRegistered ) Physics.updateCollider( this ); }
public static Entity setParent( this Entity self, Transform parent ) { self.transform.setParent( parent ); return self; }
public override void onEntityTransformChanged( Transform.Component comp ) { // we dont care if the transform changed if we are in world space if( useWorldSpace ) return; _bounds.calculateBounds( entity.transform.position, _localOffset, Vector2.Zero, entity.transform.scale, entity.transform.rotation, width, height ); }
public override void onEntityTransformChanged( Transform.Component comp ) { // we only deal with positional changes here. TiledMaps cant be scaled. if( _shouldCreateColliders && comp == Transform.Component.Position ) { removeColliders(); addColliders(); } }