private UselessCitizen.E_UselessType Type(UselessCitizen.E_UselessType type) { UselessCitizen.E_UselessType ret = UselessCitizen.E_UselessType.Null; if (type == UselessCitizen.E_UselessType.Null) { ret = (UselessCitizen.E_UselessType)Util.Random(0, 2); } else { ret = type == UselessCitizen.E_UselessType.Escaple ? UselessCitizen.E_UselessType.ForHelp : UselessCitizen.E_UselessType.Escaple; } return(ret); }
private void CreateCitizen() { UselessCitizen.E_UselessType type = UselessCitizen.E_UselessType.Null; GameObject character0 = PoolManager.Instance.Spawn(PoolItemName.Citizen0); type = Type(type); List <Transform> path0 = type == UselessCitizen.E_UselessType.Escaple ? mCitizen0Path : mCitizen1Path; UselessCitizen citizen0 = new UselessCitizen(character0, path0, type); GameObject character1 = PoolManager.Instance.Spawn(PoolItemName.Citizen2); type = Type(type); List <Transform> path1 = type == UselessCitizen.E_UselessType.ForHelp ? mCitizen1Path : mCitizen0Path; UselessCitizen citizen1 = new UselessCitizen(character1, path1, type); citizenList.Add(citizen0); citizenList.Add(citizen1); Invoke("ActiveStageSys", 2.0f); }