コード例 #1
0
ファイル: GameManager.cs プロジェクト: Krekerfooll/game
    private void Start()
    {
        // centipede (or other enemies) deal damage to finalPoint, which give this damage to playerHitPoints

        playerHitPoints = playerScriptableHitPoints.CreateHitPointsClass();

        finalPoint.RegisterObserver(playerHitPoints);

        foreach (BaseImplementer item in baseImplementers)
        {
            item.Calculate(playerHitPoints.GetHitPoints());
            playerHitPoints.RegisterObserver(item);
        }

        playerHitPoints.RegisterObserver(this);
    }