Exemplo n.º 1
0
        public MainForm()
        {
            this.InitializeComponent();
            this.ReadInitializeFile();
            this.lbl_processCode.Text = Common.process_code + " " + Common.line_part;

            ComTimer.Interval = 500;
            ComTimer.Start();

            string resContent = HttpRequester.Login();

            this.checkResContent(resContent);

            recSocket = new RecSocket(this);
            Thread socketThread =
                new Thread(new ThreadStart(recSocket.ListenMethod));

            socketThread.Name         = "SocketThread";
            socketThread.IsBackground = true;
            socketThread.Start();

            ComRefreshTimer.Start();
            ComConnector.InitTaskQueue();
        }
 public void Awake()
 {
     Time.timeScale = 1;
     CreateLevel ();
     FindAllSpawnPoints();
     _timer = gameObject.AddComponent<ComTimer>();
     Physics2D.IgnoreLayerCollision(8,8, true);
     InitGame();
     GameObject.Find ("UI").GetComponent<InGameUI> ();
     //SetPause(true,false,true);
     PlayerWait (true);
     CountDown ();
 }
    // Use this for initialization
    void Start()
    {
        touchDetector = gameObject.GetComponent<TouchDetector2D> ();
        rigidBody = gameObject.GetComponent<Rigidbody2D> ();
        touchDetector.OnTouch += OnTouch;
        _player = gameObject.GetComponent<Player> ();

        _inAttackTimer = gameObject.AddComponent<ComTimer> ();
        _inAttackTimer.TimerEnded += EndTimer;
    }
 //private Player _player;
 void Awake()
 {
     _transformBackTimer = gameObject.AddComponent<ComTimer> ();
     _transformBackTimer.TimerEnded += EndTransformTime;
 }
Exemplo n.º 5
0
 void Awake()
 {
     _attackCooldownTimer = gameObject.AddComponent<ComTimer> ();
     _attackCooldownTimer.TimerEnded += EndCooldownTimer;
 }
Exemplo n.º 6
0
    // Spawn Protection (called by game controller)
    public void ActivateIdleProtection(int timeProtectedInFullSeconds)
    {
        SetInvulnerable (true);

        _spawnInvulnerableTimer = gameObject.AddComponent<ComTimer> ();
        _spawnInvulnerableTimer.StartTimer (0.2f,(timeProtectedInFullSeconds * 5));
        _spawnInvulnerableTimer.TimerTik += ProtectionTik;

        StartedAction += EndProtection;
    }
Exemplo n.º 7
0
    void Awake()
    {
        this.transform.tag = Tags.PLAYER;

        _myPlatformerMovement = gameObject.AddComponent<PlatformerMovement>();

        _attackCatcher = gameObject.AddComponent<AttackCather> ();
        _clashAble = gameObject.AddComponent<ClashAble> ();
        _basicAttack = gameObject.AddComponent<BasicStunAttack> ();
        _playerTransformer = gameObject.AddComponent<PlayerTransformer> ();
        gameObject.AddComponent<TouchDetector2D> ();
        gameObject.AddComponent<LandOnTopKill> ();
        rigidBody = gameObject.GetComponent<Rigidbody2D> ();
        _playerAnimHandler = gameObject.AddComponent<PlayerAnimationHandler> ();
        gameObject.AddComponent<RigidbodyUtil2D>();

        _fader = gameObject.AddComponent<FadeInOut> ();

        gameObject.AddComponent<PlayerEffects>();
        gameObject.AddComponent<PlayerSoundHandler>();

        _stunTimer = gameObject.AddComponent<ComTimer> ();

        _stunTimer.TimerEnded += StunTimerEnded;

        _attackCatcher.OnStunAttackCatch += OnStunHit;
        _attackCatcher.OnStunKillAttackCatch += OnStunKillHit; // if Jump on my head hit while in stun
        _attackCatcher.OnKillAttackCatch += OnKillHit;
    }