Inheritance: NodeWithID
コード例 #1
0
        public void Remove(INode obj)
        {
            if (obj is GunNode)
                _playerGunNode = null;
            else
            if (obj is PlayerTargetNode)
            {
                var targetNode = obj as PlayerTargetNode;

                targetNode.healthComponent.isDead.subscribers -= OnTargetDead;
            }
            else
            if (obj is PlayerNode)
            {
                (obj as PlayerNode).healthComponent.isDead.subscribers -= OnPlayerDead;
            }
        }
コード例 #2
0
 private void OnPlayerDead(int ID)
 {
     _playerGunNode = null;
 }