예제 #1
0
        public static void EnemyTriggerAreaSetting(int index)
        {
            if (!lstEnemyData[index].direction)
            {
                lstEnemyData[index].triggerAreaPos.X =
                    lstEnemyData[index].position.X - (lstEnemyData[index].triggerAreaSize.X * 32 + lstEnemyData[index].triggerAreaOffset.X);
            }
            else
            {
                lstEnemyData[index].triggerAreaPos.X = lstEnemyData[index].position.X + lstEnemyData[index].size.X;
            }

            lstEnemyData[index].triggerAreaPos.Y = lstEnemyData[index].position.Y;

            CollisionCheck.ColliderCheckMaskSetting(lstEnemyData[0].triggerAreaPos.X, lstEnemyData[0].triggerAreaPos.Y,
                                                    lstEnemyData[index].triggerAreaOffset.X + lstEnemyData[index].triggerAreaSize.X * 32,
                                                    lstEnemyData[index].triggerAreaOffset.Y + lstEnemyData[index].triggerAreaSize.Y * 32);
        }