示例#1
0
    public void ResetBeaver()
    {
        cannon.shot = false;
        cannon.ResetCannon();
        beaver.transform.position = new Vector3(startPosition.position.x, startPosition.position.y + cannon.yOffsets[UpgradeManager.instance.GetCannonUpgradeNum()], startPosition.position.z);
        beaver.SetDead(false);
        beaver.Deactivate();
        camera.ResetCamera();
        levelGenerator.ClearLevel();

        powerBar.Activate();
        RunWood = 0;
        AddWood(0);
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     /*
      * lr = GetComponent<LineRenderer>();
      * // Set some positions
      * Vector3[] positions = new Vector3[2];
      * positions[0] = transform.position;
      * positions[1] = new Vector3(0.0f, -0.5f, 0.0f);
      *
      * lr.positionCount = positions.Length;
      * lr.SetPositions(positions);
      */
     ResetCannon();
     beaver.Deactivate();
 }