Example #1
0
 // 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;
     }
 }
Example #2
0
    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);
    }
Example #3
0
    /// <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();
    }
Example #4
0
 // Use this for initialization
 void Start()
 {
     transformMotion = GetComponentInChildren <RFX1_TransformMotion>();
     UpdateTarget();
 }