sakibguy / worked-issues

arget medi a[rpescriptionmedicie] &ssets[dr] (reeeverse._ax:p)
2 stars 0 forks source link

[ORG] RU-MAKEAPP: error CS0246 #28

Closed sakibguy closed 2 years ago

sakibguy commented 2 years ago

Assets\Scenes\ColorCircle.cs(4,7): error CS0246: The type or namespace name 'DG' could not be found (are you missing a using directive or an assembly reference?)

1

in ColorCircle.cs

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using System.Linq;

public class ColorCircle : MonoBehaviour {

    public static ColorCircle instance;

    public GameObject[] colorsObject;

    private Dictionary<string, Color> colors = new Dictionary<string, Color>();

    private void Awake() {
        if (instance == null) {
            instance = this;
        }
    }

    // Start is called before the first frame update
    void Start() {
        colors.Add("black", Color.black);
        colors.Add("red", Color.red);
        colors.Add("cyan", Color.cyan);
        colors.Add("white", Color.white);
        SetColor();
        transform.DOKill();
        gameObject.transform.DORotate(new Vector3(0, 0, 50), 5f).SetLoops(-1, LoopType.Incremental).SetEase(Ease.Linear);
    }

    private void OnDisable() {
        transform.DOKill();
    }

    private void SetColor() {
        transform.DOKill();
        for (int i = 0; i < colorsObject.Length; i++) {
            int randomIndex = Random.Range(0, colors.Count);
            colorsObject[i].GetComponent<SpriteRenderer>().color = colors.ElementAt(randomIndex).Value;
            colorsObject[i].gameObject.name = colors.ElementAt(randomIndex).Key;
            colors.Remove(colors.ElementAt(randomIndex).Key);
        }
    }

    public void AnimationStart() {
        transform.DOScale(new Vector3(0.1f, 0.1f, 1), 0.5f).SetEase(Ease.InOutSine).OnComplete(()=> {
            transform.DOScale(new Vector3(1, 1, 1), 0.5f).SetEase(Ease.InOutSine);
        });
    }

}
sakibguy commented 2 years ago

https://github.com/Demigiant/dotween/issues/314

sakibguy commented 2 years ago

Solution

http://dotween.demigiant.com/getstarted.php

Copy paste Plugins directory to the Assets directory 1