Пример #1
0
        private void Start()
        {
            if (sprite == null)
            {
                sprite = GetComponent <SpriteRenderer>();
            }

            if (visualEffects == null)
            {
                visualEffects = GameObject.Find("GameManager").GetComponent <VisualEffects>();
            }

            if (gameManager == null)
            {
                gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();
            }

            movingPlatform         = true;
            verticalMovingPlatform = true;

            startPos    = transform.position;
            startPos.x += startXOffset;
            startPos.y += startYOffset;

            targetPos           = new Vector3(startPos.x + horPlatformDistance, startPos.y + vertPlatformDistance);
            playerDragThruCloud = 25f;
        }
Пример #2
0
        private void Start()
        {
            if (visualEffects == null)
            {
                visualEffects = GameObject.Find("GameManager").GetComponent <VisualEffects>();
            }

            if (gameManager == null)
            {
                gameManager = GameObject.Find("GameManager").GetComponent <GameManager>();
            }
        }
Пример #3
0
 private void Awake()
 {
     Instance = this;
 }