예제 #1
0
        void Start()
        {
            rb           = GetComponent <Rigidbody2D>();
            gravityScale = rb.gravityScale;

            ringData = GetComponent <RingDataHandler>();
        }
예제 #2
0
        void Start()
        {
            gm       = FindObjectOfType <GameManager>();
            ringData = GetComponent <RingDataHandler>();

            isGrabbing = false;

            rotationSpeed = ringData.GetFloatValue("rotationSpeed");
        }
예제 #3
0
        void Start()
        {
            gm       = FindObjectOfType <GameManager>();
            ringData = GetComponent <RingDataHandler>();

            speed    = ringData.GetFloatValue("speed");
            speedVec = Vector2.zero;
            inertia  = ringData.GetFloatValue("inertia");

            rb = GetComponent <Rigidbody2D>();
        }
예제 #4
0
        bool glowActive = false;            // Glow activation status

        void Awake()
        {
            ringData = GetComponent <RingDataHandler>();

            FrontRenderer = transform.Find("Front").GetComponent <SpriteRenderer>();
            BackRenderer  = transform.Find("Back").GetComponent <SpriteRenderer>();

            Glow = transform.Find("Glow").gameObject;

            GlowFrontRenderer = Glow.transform.Find("GlowFront").GetComponent <SpriteRenderer>();
            GlowBackRenderer  = Glow.transform.Find("GlowBack").GetComponent <SpriteRenderer>();

            BoxCollider2D[] boxs = GetComponents <BoxCollider2D>();

            boxL = boxs[0];
            boxR = boxs[1];

            boxSelection = transform.Find("Selection").GetComponent <BoxCollider2D>();
            boxHole      = transform.Find("Hole").GetComponent <BoxCollider2D>();
        }
예제 #5
0
 void Awake()
 {
     ringData = GetComponent <RingDataHandler>();
     rb       = GetComponent <Rigidbody2D>();
 }
 private void Awake()
 {
     ringData          = GetComponent <RingDataHandler>();
     SpritesController = GetComponent <RingSpritesController>();
 }