示例#1
0
 protected override void OnEnable()
 {
     isInForeground = ProbabilityUtil.PercentChance(35f);
     SetSpeeds();
     SetScale();
     SetLayer();
     SetColor();
     SetPosition();
 }
示例#2
0
    protected override void OnEnable()
    {
        isFromAbove = ProbabilityUtil.PercentChance(50f);
        base.OnEnable();

        GetComponent <SpriteRenderer>().color = Color.white;
        isMakeSound = ProbabilityUtil.PercentChance(20f);
        GetComponent <Animator>().enabled     = true;
        GetComponent <SpriteRenderer>().flipY = false;
    }
 private void FlipObject()
 {
     if (ProbabilityUtil.PercentChance(50))
     {
         transform.rotation = Quaternion.Euler(0, 180f, 0);
         isFlipped          = true;
     }
     else
     {
         transform.rotation = Quaternion.Euler(0, 0, 0);
         isFlipped          = false;
     }
 }
示例#4
0
 public void InitializeProbabilities()
 {
     bigBranchSmallChild_Probabilites = new ProbabilityUtil(BranchDecay_probabilites);
     branchNum_Probabilites           = new ProbabilityUtil(BranchNum_probabilites);
 }