Beispiel #1
0
 public void OnPointerExit(PointerEventData data)
 {
     if (currentBlock != null && IsActive)
     {
         currentBlock = null;
     }
 }
Beispiel #2
0
    /// <summary>
    /// EnterBlock
    /// </summary>
    public virtual void EnterBlock(BattleBlock block)
    {
        if (block == null)
        {
            return;
        }

        TriggerBlock = block;
    }
Beispiel #3
0
 public Block(int i, int j, BattleBlock lb)
 {
     m_i         = i;
     m_j         = j;
     linkedBlock = lb;
     state       = BlockState.Empty;
     isPlacable  = false;
     isLock      = false;
 }
Beispiel #4
0
 public void OnPointerDown(PointerEventData data)
 {
     if (data.button == PointerEventData.InputButton.Left)
     {
         if (IsActive)
         {
             currentBlock = this;
         }
     }
     LongPress();
 }
Beispiel #5
0
 public virtual void ExitBlock(BattleBlock block)
 {
     if (TriggerBlock == block)
     {
         TriggerBlock = null;
     }
     else
     {
         triggerBlockList.Remove(block);
     }
 }
Beispiel #6
0
    void OnTriggerEnter(Collider col)
    {
        if (col.gameObject.layer == LayerMask.NameToLayer("BattleBlock"))
        {
            BattleBlock block = col.gameObject.GetComponent <BattleBlock> ();

            EnterBlock(block);
//			if (block != null) {
//				block.EnterHero (this);
//			}
        }
    }
Beispiel #7
0
 public void AddBlock(Point2 _point, BattleBlock battle_block)
 {
     blocks.Add(_point, battle_block);
 }