// Use this for initialization void Start() { god = this; // 静态状态初始化 prepareState = new PrepareState(); emptyState = new EmptyState(); roundExchangeState = new RoundExchangeState(); attackPrepareState = new AttackPrepareState(); attackCompletedState = new AttackCompletedState(); cardSelectedState = new CardSelectedState(); targetSelectedState = new TargetSelectedState(); cardCastedState = new CardCastedState(); gameOverState = new GameOverState(); // 设置初始状态 currentState = prepareState; isFree = true; init(); }