示例#1
0
 public Runmode(ILoggerFactory loggerFactory, BaseConfig baseConfig, RunmodeConfig runmodeConfig)
 {
     _runmodeConfig = runmodeConfig;
     _logger        = loggerFactory.CreateLogger <Runmode>();
     _stopToken     = new StopToken();
     _modeBase      = new ModeBase(loggerFactory, baseConfig, _stopToken);
 }
示例#2
0
    public override bool Equition(Charactor _obj, ModeBase _mode)
    {
        if (_obj.tag.ToString() == "Player")
        {
            TestPlayer _player = _obj.GetComponent <TestPlayer>();
            float      f       = Input.GetAxis("MyHorizontal");
            if (f != 0)

            {
                if (_mode.IsInputReception(_obj))
                {
                    return(true);
                }
            }

            if (Input.GetButton("MyLeft") || Input.GetButton("MyRight"))

            {
                if (_mode.IsInputReception(_obj))
                {
                    return(true);
                }
            }
        }
        return(false);
    }
示例#3
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.modetime > _mode.EndTime)
     {
         return(true);
     }
     return(false);
 }
示例#4
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if ((_obj.modetime > Time) & IsAfter)
     {
         return(true);
     }
     return(false);
 }
    public override bool Equition(Charactor _obj, ModeBase _mode)
    {
        TestPlayer p = _obj.GetComponent <TestPlayer>();

        if ((p.keysuccesstimer > Time) & IsAfter)
        {
            return(true);
        }
        return(false);
    }
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_mode.ModeChange_Random < Percent)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#7
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_mode.CallBack_Reciver == CallBack_N)
     {
         return(BOOL);
     }
     else
     {
         return(!BOOL);
     }
 }
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         if (_player.recorder.Check(MyKey))
         {
             return(true);
         }
     }
     return(false);
 }
示例#9
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (!_obj.animator)
     {
         return(false);
     }
     if (_obj.animator.GetCurrentAnimatorStateInfo(0).normalizedTime > 1.0f && _obj.modetime > 0.1f)
     {
         return(true);
     }
     return(false);
 }
示例#10
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         if ((Input.GetAxis("MyHorizontal") == 0.0f) && !Input.GetButton("MyRight") && !Input.GetButton("MyLeft"))
         {
             return(true);
         }
     }
     return(false);
 }
示例#11
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         if (Input.GetButtonDown(MyKey) && _mode.IsInputReception(_obj))
         {
             return(true);
         }
     }
     return(false);
 }
示例#12
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         //↑キーが押されているか
         if (_player.IsGround())
         {
             return(true);
         }
     }
     return(false);
 }
示例#13
0
        public Matchmode(ILoggerFactory loggerFactory, BaseConfig baseConfig, MatchmodeConfig matchmodeConfig)
        {
            _matchmodeConfig = matchmodeConfig;
            _loggerFactory   = loggerFactory;
            _logger          = loggerFactory.CreateLogger <Matchmode>();
            _stopToken       = new StopToken();
            _modeBase        = new ModeBase(loggerFactory, baseConfig, _stopToken);

            _broadcastServer = new WebsocketBroadcastServer(
                loggerFactory.CreateLogger <WebsocketBroadcastServer>(), "localhost", 5001);
            _overlayConnection =
                new OverlayConnection(loggerFactory.CreateLogger <OverlayConnection>(), _broadcastServer);
        }
示例#14
0
        internal LoadRequest(ModeBase mode, BundlerContext context, string path, BundleLoaderBase bundleLoader)
        {
            _path         = path;
            _context      = context;
            _mode         = mode;
            _bundleLoader = bundleLoader;

            IsDone = _bundleLoader == null;

            if (!IsDone)
            {
                LoadInternal();
            }
        }
示例#15
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         if ((Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.LeftArrow)))
         {
             if (_mode.IsInputReception(_obj))
             {
                 return(true);
             }
         }
     }
     return(false);
 }
示例#16
0
    public override bool Equition(Charactor _obj, ModeBase _mode)
    {
        if (_obj.tag.ToString() == "Player")
        {
            TestPlayer _player = _obj.GetComponent <TestPlayer>();
            //MPが足りているか
            P_ModeBase pmode = (P_ModeBase)targetmode;
            if (_player.status.MP >= pmode.MP)
            {
                return(true);
            }
        }
        //もし不足していたら効果音を鳴らす

        return(false);
    }
示例#17
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() != "Player")
     {
         E_ModeBase e_mode = (E_ModeBase)_mode;
         if (Vector3.Distance(_obj.transform.position, _obj.gameobject_player.transform.position) < e_mode.AttackRange)
         {
             return(!IsOut);
         }
         else
         {
             return(IsOut);
         }
     }
     return(false);
 }
示例#18
0
        public static string ToJason <T>(this ModeBase modeBase, List <T> oList)
        {
            string result;

            if (oList == null || oList.Count == 0)
            {
                return(string.Empty);
            }
            try
            {
                result = JsonConvert.SerializeObject(oList, Formatting.None);
            }
            catch (Exception)
            {
                result = string.Empty;
            }
            return(result);
        }
示例#19
0
        public static string ToJason(this ModeBase modeBase)
        {
            string result;

            if (modeBase == null)
            {
                return(string.Empty);
            }
            try
            {
                result = JsonConvert.SerializeObject(modeBase, Formatting.None);
            }
            catch (Exception)
            {
                result = string.Empty;
            }
            return(result);
        }
示例#20
0
 public override bool Equition(Charactor _obj, ModeBase _mode)
 {
     if (_obj.tag.ToString() == "Player")
     {
         TestPlayer _player = _obj.GetComponent <TestPlayer>();
         //↑キーが押されているか
         if ((Input.GetKeyDown(KeyCode.UpArrow)) || (Input.GetButtonDown("MySpace")))
         {
             if (_player.IsGround() && _player.jump_waittime >= jump_waittime)
             {
                 if (_mode.IsInputReception(_obj))
                 {
                     _player.jump_waittime = 0.0f;
                     return(true);
                 }
             }
         }
     }
     return(false);
 }
示例#21
0
 //このアダプタに関連付けられてる全ての条件式の積を取る関数
 public bool IsAllEqition(Charactor _obj, ModeBase _mode)
 {
     //先にequitionが存在するかどうかを確認
     if (Array.IndexOf(eqition, null) > -1 || eqition.Length == 0)
     {
         return(false);
     }
     foreach (EqitionBase i in eqition)
     {
         if (!i.Equition(_obj, _mode))
         {
             return(false);
         }
     }
     if (CallForDebug)
     {
         Debug.Log("Equition Returned True");
     }
     return(true);
 }
示例#22
0
 //オブジェクトとモードの参照を引数とする
 public virtual bool Equition(Charactor _obj,ModeBase _mode)
 {
     return false;
 }
示例#23
0
    // Use this for initialization
    void Start()
    {
        CreateKeys();

        Mode = new ModeRandom();
    }
示例#24
0
 public DualcoreMode(ILoggerFactory loggerFactory, BaseConfig baseConfig)
 {
     _logger    = loggerFactory.CreateLogger <DualcoreMode>();
     _stopToken = new StopToken();
     _modeBase  = new ModeBase(loggerFactory, baseConfig, _stopToken);
 }
示例#25
0
 internal LoadRequestSync(ModeBase mode, BundlerContext context, string path, BundleLoaderBase bundleLoader)
     : base(mode, context, path, bundleLoader)
 {
 }