// Use this for initialization void Start() { transformMotion = GetComponentInChildren <RFX1_TransformMotion>(); if (transformMotion != null) { transformMotion.CollisionEnter += TransformMotion_CollisionEnter; coll = transformMotion.gameObject.AddComponent <SphereCollider>(); coll.radius = 0.1f; coll.isTrigger = true; } }
public override IEnumerator Cast(int origin) { InstantiateAboveTile(origin, 0f, Vector3.one); IEnumerator r = MoveUpScaleUpSpin(2f, 1f, new Vector3(6f, 6f, 6f)); yield return(r); RFX1_TransformMotion tm = instance.GetComponentInChildren <RFX1_TransformMotion>(); tm.enabled = true; yield return(null); }
/// <summary> /// Starts this instance. /// </summary> void Start() { if (useRFX) { rfx = GetComponentInChildren <RFX1_TransformMotion>(); rfx.targetBlast = this; } player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); var physicsMotion = GetComponentInChildren <RFX4_PhysicsMotion>(true); if (physicsMotion != null) { physicsMotion.CollisionEnter += CollisionEnter; } var raycastCollision = GetComponentInChildren <RFX4_RaycastCollision>(true); if (raycastCollision != null) { raycastCollision.CollisionEnter += CollisionEnter; } SetUp(); }
// Use this for initialization void Start() { transformMotion = GetComponentInChildren <RFX1_TransformMotion>(); UpdateTarget(); }