testCeshi.cs 849 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class testCeshi : MonoBehaviour
  5. {
  6. private int allm = 73;
  7. private int ewai = 10;
  8. private int cun=20;
  9. private float lixi=0.04f;
  10. private int nian=5;
  11. // Start is called before the first frame update
  12. void Start()
  13. {
  14. float now = allm-20;
  15. float all = now;
  16. float wuall = now;
  17. for (int i = 0; i < nian; i++)
  18. {
  19. wuall += cun;
  20. all += cun;
  21. all = all+ (all * lixi);
  22. }
  23. all = ewai * nian + all;
  24. wuall = ewai * nian + wuall;
  25. float erwai2 = 20-160;
  26. all += erwai2;
  27. wuall += erwai2;
  28. Debug.Log(all);
  29. Debug.Log(wuall);
  30. }
  31. // Update is called once per frame
  32. void Update()
  33. {
  34. }
  35. }