/// <summary> /// Adds a plane collider. /// </summary> /// <returns>The PlaygroundColliderC.</returns> /// <param name="playgroundParticles">Playground particles.</param> public static PlaygroundColliderC AddCollider (PlaygroundParticlesC playgroundParticles) { PlaygroundColliderC pCollider = new PlaygroundColliderC(); playgroundParticles.colliders.Add(pCollider); return pCollider; }
/// <summary> /// Adds a plane collider and assign a transform. /// </summary> /// <returns>The PlaygroundColliderC.</returns> /// <param name="playgroundParticles">Playground particles.</param> /// <param name="transform">Transform.</param> public static PlaygroundColliderC AddCollider (PlaygroundParticlesC playgroundParticles, Transform transform) { PlaygroundColliderC pCollider = new PlaygroundColliderC(); pCollider.transform = transform; playgroundParticles.colliders.Add(pCollider); return pCollider; }
/// <summary> /// Clone this PlaygroundColliderC. /// </summary> public PlaygroundColliderC Clone () { PlaygroundColliderC playgroundCollider = new PlaygroundColliderC(); playgroundCollider.enabled = enabled; playgroundCollider.transform = transform; playgroundCollider.plane = new Plane(plane.normal, plane.distance); playgroundCollider.offset = offset; return playgroundCollider; }