This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Windows.Forms; | |
public class WindowsNotifyIcon { | |
NotifyIcon notifyIcon; | |
public void RegisterNotifyIcon(Texture2D iconTexture) { | |
notifyIcon = new NotifyIcon(); | |
MemoryStream memStream = new MemoryStream(iconTexture.EncodeToPNG()); | |
memStream.Seek(0, SeekOrigin.Begin); | |
System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(memStream); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################### | |
# Choose your ffmpeg version and your currently-installed iOS SDK version: | |
# | |
VERSION="2.0.2" | |
SDKVERSION="7.0" | |
ARCHS="armv7 armv7s i386" | |
# | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IEnumerator<IObservable<Result>> Sequence(Player invokedPlayer, Result iteratedResult) | |
{ | |
if (iteratedResult.Item1 == null) | |
yield return invokedPlayer.RequestCards(1) | |
.Select(c => new Result(c.First(), null)); | |
if (iteratedResult.Item2 == null) | |
yield return invokedPlayer.RequestCards(iteratedResult.Item1.Cost) | |
.Select(c => new Result(iteratedResult.Item1, c)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UniRx; | |
using System; | |
using System.Linq; | |
namespace NE.Model | |
{ | |
using Result = Tuple<BuildingCard, IEnumerable<Card>>; | |
public class Carpenter : DeployableCard | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UniRx; | |
namespace NE.Model | |
{ | |
public class Game | |
{ | |
public IObservable<Unit> Run(Board board, Queue<Player> players, BehaviorSubject<Player> startingPlayer) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension URL: Decodable { | |
public static func decode(_ json: JSON) -> Decoded<URL> { | |
guard case .string(let str) = json else { return .failure(.typeMismatch(expected: "String", actual: json.description)) } | |
guard let url = URL(string: str) else { return .failure(.custom("\(str) does not confirm URL expression"))} | |
return pure(url) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace Monad.Extensions | |
{ | |
public interface ContState<TState, TValue> : Cont<Unit, State<TState, TValue>> { } | |
internal readonly struct PureContState<TState, TValue> : ContState<TState, TValue> | |
{ | |
readonly Func<Func<State<TState, TValue>, Unit>, Unit> function; | |
internal PureContState(Func<Func<State<TState, TValue>, Unit>, Unit> function) => this.function = function; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using Monad; | |
using Monad.Extensions; | |
namespace BuildCiv.Model.CardDifinition | |
{ | |
public readonly struct Barter : IPlayable | |
{ | |
public int CivilCost => 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BattleMain: MonoBehaviour { | |
public event EventHandler<List<UnitInfo>> UnitInfoUpdateHandler; | |
public SomeBattleProcess() { | |
// ~~~~何らかの戦闘処理でUnitInfoのリストが更新 | |
UnitInfoUpdateHandler(this, this.unitInfoList); | |
} | |
} | |
//////////////////////////////// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_objUnitColorTop = Enumerable.Range(0, 3).Select(y => Enumerable.Range(0, 6).Select(x => { | |
var obj = Instantiate("PrefabName"); | |
// obj.transform.parent = などの処理 | |
return obj; | |
}).ToArray()).ToArray(); |
OlderNewer