void Start() { sailState = sailPos.Down; SailOBJ = this.gameObject; scaleChange = new Vector3(0.0f, 250.0f, 0.0f); sailUp(); }
private void sailDown() { StartCoroutine(shipAngleCoroutine()); sailState = sailPos.Down; Debug.Log("Sail is down."); gameObject.transform.localScale += scaleChange; Debug.Log(sailState); }
private void sailUp() { StopAllCoroutines(); //StopCoroutine(shipAngleCoroutine()); sailState = sailPos.Up; Debug.Log("Sail is up! Speed is regular"); gameObject.transform.localScale -= scaleChange; sailSpeed = regular; Debug.Log(sailState); }