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); }
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); } }
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); }
public void SetSnowBallStatusHolder(SnowBallStatusHolder snowBallStatusHolder) { this.snowBallStatusHolder = snowBallStatusHolder; }