Ejemplo n.º 1
0
    public void Init(PullLauncher father)
    {
        this.father = father;
        lineRenderer = father.GetComponent<LineRenderer>();

        float ballSize = transform.localScale.x;
        lineRenderer.SetWidth(ballSize/2, ballSize);
    }
Ejemplo n.º 2
0
    void Awake()
    {
        instance = this;

        if (minDistance >= maxDistance) {
            Debug.LogError("minDistance shouldn't be bigger than maxDistance!");
            enabled = false;
        }

        if (minLaunchPower >= maxLaunchPower) {
            Debug.LogError("minLaunchPower shouldn't be bigger than maxLaunchPower!");
            enabled = false;
        }
    }