Ejemplo n.º 1
0
    public void OnCollisionWithGoal(object source, GameObjectEventArgs args)
    {
        SnowBallStatusHolder snowBallStatusManager = args.GameObject.GetComponent <ISnowBallStatusHolder>().GetSnowBallStatusHolder();
        int ballPointValue = snowBallStatusManager.SnowBallPointValue;
        int goalID         = snowBallStatusManager.LastContactedGoalID;

        AddScorePoints(ballPointValue, goalID);
    }
Ejemplo n.º 2
0
 public override void OnNotify(string eventName, GameObject[] associatedGameObjects)
 {
     if (eventName == "GoalEvent")
     {
         SnowBallStatusHolder snowBallStatusManager = associatedGameObjects[0].GetComponent <ISnowBallStatusHolder>().GetSnowBallStatusHolder();
         int ballPointValue = snowBallStatusManager.SnowBallPointValue;
         int goalID         = snowBallStatusManager.LastContactedGoalID;
         AddScorePoints(ballPointValue, goalID);
     }
 }
Ejemplo n.º 3
0
    public void PileUpSnowBall()
    {
        SnowBallStatusHolder ballStatusHolder = GameObject.Find("SnowBall").GetComponent <ISnowBallStatusHolder>().GetSnowBallStatusHolder();

        if (ballStatusHolder != null && ballStatusHolder.SnowballOwner != null)
        {
            ballStatusHolder.SnowBallPointValue     += snowBallPointValueToAdd;
            ballStatusHolder.SnowBallSizeMultiplier += snowBallSizeMultiplier;
        }
        Destroy(gameObject);
    }
Ejemplo n.º 4
0
 public void SetSnowBallStatusHolder(SnowBallStatusHolder snowBallStatusHolder)
 {
     this.snowBallStatusHolder = snowBallStatusHolder;
 }