void Start() { bod = GetComponent<LPBody>(); lpman = FindObjectOfType<LPManager>(); if (lpman.UseContactListener == false) { Debug.LogError("This body destroyer needs 'Use Contact Listener' in the LPManager component in this scene to be set to reue in order to work"); } }
void Start() { bod = GetComponent <LPBody>(); lpman = FindObjectOfType <LPManager>(); if (lpman.UseContactListener == false) { Debug.LogError("This body destroyer needs 'Use Contact Listener' in the LPManager component in this scene to be set to reue in order to work"); } }
/// <summary>Create this joint in the simulation</summary> public void Initialise(LPManager man) { if (BodyA !=null && BodyB !=null && BodyA.GetComponent<LPBody>() != null && BodyB.GetComponent<LPBody>() != null) { lpman = man; Initialise2(lpman.GetPtr()); } else Debug.LogError("This Joint must be assigned 2 Bodies to connect in order to be created"); }
// Use this for initialization void Awake() { lpManager = FindObjectOfType <LPManager>(); if (SceneView.currentDrawingSceneView != null) { SceneView.currentDrawingSceneView.wantsMouseMove = true; } SetupBody(); }
// Use this for initialization void Start() { #if UNITY_EDITOR if(FindObjectOfType<LPManager>() == null) { Debug.LogError("There is no LPManager. You must have one in your scene for Liquid Physics 2D to work"); return; } #endif lpman = FindObjectOfType<LPManager>(); }
void Start() { lpman = FindObjectOfType <LPManager>(); caster = GetComponent <LPRayCaster>(); shape = GetComponent <LPFixture>().GetShape(); if (AutoShoot) { StartCoroutine("shoot"); } }
// Use this for initialization void Start() { #if UNITY_EDITOR if (FindObjectOfType <LPManager>() == null) { Debug.LogError("There is no LPManager. You must have one in your scene for Liquid Physics 2D to work"); return; } #endif lpman = FindObjectOfType <LPManager>(); }
/// <summary>Create this joint in the simulation</summary> public void Initialise(LPManager man) { if (BodyA != null && BodyB != null && BodyA.GetComponent <LPBody>() != null && BodyB.GetComponent <LPBody>() != null) { lpman = man; Initialise2(lpman.GetPtr()); } else { Debug.LogError("This Joint must be assigned 2 Bodies to connect in order to be created"); } }
void Start() { #if UNITY_EDITOR if(GameObject.FindObjectOfType<LPManager>() == null) { Debug.LogError("There is no LiquidFunManager. You must have one in your scene for Liquid Physics 2D to work"); return; } #endif lpman = FindObjectOfType<LPManager>(); Start2(); if (Active) StartCoroutine("Spawn"); }
//This creates the body and its fixtures in the physics simulation public void Initialise(LPManager man) { StartRotation = transform.localEulerAngles.z; lpman = man; myIndex = lpman.AddBody(this); ThingPtr = LPAPIBody.CreateBody(lpman.GetPtr(), (int)BodyType, transform.position.x, transform.position.y , 0f , LinearDamping, AngularDamping, AllowSleep, FixedRotation, IsBullet, GravityScale , myIndex); foreach (LPFixture _fix in gameObject.GetComponents <LPFixture>()) { _fix.Initialise(this); } Initialised = true; }
/// <summary>Create this joint in the simulation</summary> public void Initialise(LPManager man) { lpman = man; if (BodyA != null && BodyB != null && BodyA.GetComponent <LPBody>() != null && BodyB.GetComponent <LPBody>() != null) { if (BodyA.GetComponent <LPBody>().Initialised&& BodyB.GetComponent <LPBody>().Initialised) { Initialise2(lpman.GetPtr()); initialised = true; } } else { Debug.LogError("The " + gameObject.name + " Joint must be assigned 2 Bodies to connect in order to be created"); } }
/// <summary> /// Creates the particle system in the physics simulation and creates any existing particle groups</summary> public void Initialise(IntPtr world, bool debug, int index) { lpMan = FindObjectOfType <LPManager>(); if (Particles != null) { Debug.Log(Particles.Count); } Index = index; //PartSysPtr = LPAPIParticleSystems.CreateParticleSystem(world, ParticleRadius, Damping, GravityScale, Index); PartSysPtr = LPAPIParticleSystems.CreateParticleSystem2(world, ParticleRadius, Damping, GravityScale, Index, SurfaceTensionNormalStrenght, SurfaceTensionPressureStrenght, ViscousStrenght); LPAPIParticleSystems.SetDestructionByAge(PartSysPtr, DestroyByAgeAllowed); if (ParticleAmountLimit > 0) { LPAPIParticleSystems.SetMaxParticleCount(PartSysPtr, ParticleAmountLimit); } LPAPIParticleSystems.SetParticleSystemIndex(PartSysPtr, Index); if (debug) { Debug.Log("Particle System Created at: 0x" + PartSysPtr.ToInt64()); } foreach (LPParticleGroup _shape in GameObject.FindObjectsOfType <LPParticleGroup>()) { if (Index == _shape.ParticleSystemImIn && _shape.SpawnOnPlay) { _shape.Initialise(this); } } if (debug) { Debug.Log(LPAPIParticleSystems.GetNumberOfParticles(PartSysPtr) + " Particles created"); } Drawers = GetComponentsInChildren <LPDrawParticleSystem>(); for (int i = 0; i < Drawers.Length; i++) { Drawers[i].Initialise(this); } particlesCountArray = new float[1]; Particles = new List <LPParticle>(); particleData = new float[0]; }
void Start() { #if UNITY_EDITOR if (GameObject.FindObjectOfType <LPManager>() == null) { Debug.LogError("There is no LiquidFunManager. You must have one in your scene for Liquid Physics 2D to work"); return; } #endif lpman = FindObjectOfType <LPManager>(); Start2(); if (Active) { StartCoroutine("Spawn"); } }
// Use this for initialization void Start() { mouseQuery = GetComponent <MouseQueryWorldForBody>(); lpMan = FindObjectOfType <LPManager>(); }
void Start() { lpman = FindObjectOfType <LPManager>(); shape = ExplosionShape.GetShape(); StartCoroutine("fuse"); }
// Use this for initialization void Start() { shape = GetComponent <LPFixture>().GetShape(); lpman = FindObjectOfType <LPManager>(); }
// Use this for initialization void Start() { lpMan = FindObjectOfType <LPManager>(); }
// Use this for initialization void Start() { lpman = FindObjectOfType <LPManager>(); StartCoroutine("howmany"); }
void Start() { lpman = FindObjectOfType<LPManager>(); caster = GetComponent<LPRayCaster>(); shape = GetComponent<LPFixture>().GetShape(); if(AutoShoot)StartCoroutine("shoot"); }
void Start() { lpman = FindObjectOfType <LPManager>(); shape = ExplosionShape.GetShape(); }
void Start() { bound = new Bounds(transform.position, new Vector3(5, 5, 0)); lpman = FindObjectOfType <LPManager>(); }
// Use this for initialization void Start() { lpman = FindObjectOfType<LPManager>(); StartCoroutine("howmany"); }
void Start() { lpman = FindObjectOfType <LPManager>(); bod = GetComponent <LPBody>(); }
void Start() { lpman = FindObjectOfType<LPManager>(); shape = ExplosionShape.GetShape(); StartCoroutine("fuse"); }
//This creates the body and its fixtures in the physics simulation public void Initialise(LPManager man) { StartRotation = transform.localEulerAngles.z; lpman = man; myIndex = lpman.AddBody(this); ThingPtr = LPAPIBody.CreateBody(lpman.GetPtr(),(int)BodyType,transform.position.x,transform.position.y ,0f ,LinearDamping,AngularDamping,AllowSleep,FixedRotation,IsBullet,GravityScale ,myIndex); foreach (LPFixture _fix in gameObject.GetComponents<LPFixture>()) { _fix.Initialise(this); } Initialised = true; }
private void Awake() { Instance = this; }
void Start() { lpman = FindObjectOfType<LPManager>(); bod = GetComponent<LPBody>(); }
// Use this for initialization void Start() { shape = GetComponent<LPFixture>().GetShape(); lpman = FindObjectOfType<LPManager>(); }
void Start() { lpman = FindObjectOfType<LPManager>(); shape = ExplosionShape.GetShape(); }
void Start() { lpman = FindObjectOfType<LPManager>(); }
internal void SetLPman(LPManager lPManager) { this.lpman = lPManager; }